What part of it do you want ? It is a little hard to do becouse some part of it is in movieclip objects - but i will try to post it.
The code in girls frames will be like:
iTitSize:int=4;
iBoobSsize:int=5;
iassSize:int=6;
And etc. for each girl.
On enter frame it will be reed to global like varGlobalTitsSize=Player.iTitSize;
Lets make may be it like
ivarHealth=50;
ivarskill=3;
Do not wright it like var ivarHealth:int=50;
Only like ivarHealth=50; var will need only for inicialization one time and it will be mistakes. (do not see how it is now in fight code - all that part is not conected to it directly). I will load new variables in that variables and all will work So do not vorry that they are named a little strange
Like it is in your movie but starts from ivar- (integer var) for integervariables / bvar-for boolean / svar - for text and string - for example:
svarFinishingMovie:String="Tratata ta ta kill them all =)";
I use AS3 so i can not work with some parts of AS2 codes so do not worry bout it the most important it have to be named the same for each girl - like copy paste.
The code in fighting fragment is:
- Code: Select All Code
//stop();
//-------------- HP and MP ----------
var PlayerTotalHP:int=100;
var PlayerTotalMP:int=10;
var EnemyTotalHP:int=100;
var EnemyTotalMP:int=10;
tPlayerTotalHP.text="/"+String(PlayerTotalHP);
tPlayerTotalMP.text="/"+String(PlayerTotalMP);
tEnemyTotalHP.text="/"+String(EnemyTotalHP);
tEnemyTotalMP.text="/"+String(EnemyTotalMP);
var PlayerCurrentHP:int=PlayerTotalHP;
var PlayerCurrentMP:int=PlayerTotalMP;
var EnemyCurrentHP:int=EnemyTotalHP;
var EnemyCurrentMP:int=EnemyTotalMP;
PlayerHPtext.text=String(PlayerTotalHP);
PlayerMPtext.text=String(PlayerTotalMP);
EnemyHPtext.text=String(EnemyTotalHP);
EnemyMPtext.text=String(EnemyTotalMP);
//--------------attack and def stats
var PlayerMaxAtk:int=10;
var PlayerMaxDef:int=10;
var EnemyMaxAtk:int=10;
var EnemyMaxDef:int=10;
var PlayerRandomAtk:int;
var PlayerRandomDef:int;
var EnemyRandomAtk:int;
var EnemyRandomDef:int;
var FightText:String;
var PlayerGirlSkill:int=1;
var EnemyGirlSkill:int=1;
var FinisherUpperLimitToWork:int=10;
var MaxHit:int=5;
var MidHit:int=2;
var LowHit:int=1;
var FinHitCostMP:int=5;
var MaxHitCostMP:int=2;
var MidHitCostMP:int=1;
var LowHitCostMP:int=0;
var FinHitAddMP:int=5;
var MaxHitAddMP:int=3;
var MidHitAddMP:int=2;
var LowHitAddMP:int=1;
var FinFailLoseMP:int=5;
var MaxFailLoseMP:int=2;
var MidFailLoseMP:int=0;
var LowFailLoseMP:int=0;
var AttackSuccess:int;
var TempPlayerMPForAnimation:int;
var TempEnemyMPForAnimation:int;
var PlayerGirlName:String="Player111";
var EnemyGirlName:String="Enemy111";
var RanAtk,RanDef:int;
function fAttackRandom(MaxAtk,MaxDef:int):int {
RanAtk=int(Math.random()*MaxAtk)+1;
RanDef=int(Math.random()*MaxDef)+1;
if (RanAtk>RanDef) {return(1);}
else if (RanAtk<RanDef) {return(0);}
else if (RanAtk==RanDef) {return(2);}
else {
trace("Error wrong fAttackRandom=3");
return(3);
}
}
- Code: Select All Code
tFightText.text="";
PlayerAtcText.text="-";
PlayerDefText.text="-";
EnemyAtcText.text="-";
EnemyDefText.text="-";
- Code: Select All Code
//Проверка успешности атаки
AttackSuccess=fAttackRandom(PlayerMaxAtk,EnemyMaxDef);
//Так же установлены значения этих переменных
//RanAtk
//RanAtk
//Атака удалась или нет
if (AttackSuccess==1){
//Finisher Hit attack
if ((PlayerCurrentMP>=FinHitCostMP)&&(EnemyCurrentHP<=FinisherUpperLimitToWork-EnemyGirlSkill)){
EnemyCurrentHP=0;
TempPlayerMPForAnimation=PlayerCurrentMP-FinHitCostMP;
PlayerCurrentMP=PlayerCurrentMP-FinHitCostMP+FinHitAddMP;
}
//MaxHit attack
else if (PlayerCurrentMP>=MaxHitCostMP){
EnemyCurrentHP=EnemyCurrentHP-MaxHit-PlayerGirlSkill;
TempPlayerMPForAnimation=PlayerCurrentMP-MaxHitCostMP;
PlayerCurrentMP=PlayerCurrentMP-MaxHitCostMP+MaxHitAddMP;
}//MidHit hit attack
else if ((PlayerCurrentMP>=MidHitCostMP)){
EnemyCurrentHP=EnemyCurrentHP-MidHit-PlayerGirlSkill;
TempPlayerMPForAnimation=PlayerCurrentMP-MidHitCostMP;
PlayerCurrentMP=PlayerCurrentMP-MidHitCostMP+MidHitAddMP;
}//LowHit hit attack
else {
EnemyCurrentHP=EnemyCurrentHP-LowHit-PlayerGirlSkill;
TempPlayerMPForAnimation=PlayerCurrentMP-LowHitCostMP;
PlayerCurrentMP=PlayerCurrentMP-LowHitCostMP+LowHitAddMP;
}
}
else if (AttackSuccess==0){
// if finisher fail
if ((PlayerCurrentMP>=FinHitCostMP)&&(EnemyCurrentHP<=FinisherUpperLimitToWork-EnemyGirlSkill)){
TempPlayerMPForAnimation=PlayerCurrentMP-FinHitCostMP;
PlayerCurrentMP=PlayerCurrentMP-FinHitCostMP-FinFailLoseMP;
}//FinHit hit attack
//MaxHit attack
else if (PlayerCurrentMP>=MaxHitCostMP){
TempPlayerMPForAnimation=PlayerCurrentMP-MaxHitCostMP;
PlayerCurrentMP=PlayerCurrentMP-MaxHitCostMP-MaxFailLoseMP;
}//MaxHit hit attack
else if ((PlayerCurrentMP>=MidHitCostMP)){
TempPlayerMPForAnimation=PlayerCurrentMP-MidHitCostMP;
PlayerCurrentMP=PlayerCurrentMP-MidHitCostMP-MidFailLoseMP;
}//MidHit hit attack
else {
TempPlayerMPForAnimation=PlayerCurrentMP-LowHitCostMP;
PlayerCurrentMP=PlayerCurrentMP-LowHitCostMP-LowFailLoseMP;
}
}
else if (AttackSuccess==2){
//FinHit attack
if ((PlayerCurrentMP>=FinHitCostMP)&&(EnemyCurrentHP<=FinisherUpperLimitToWork-EnemyGirlSkill)){
TempPlayerMPForAnimation=PlayerCurrentMP-FinHitCostMP;
PlayerCurrentMP=PlayerCurrentMP-FinHitCostMP;
}//FinHit hit attack
//MaxHit attack
else if (PlayerCurrentMP>=MaxHitCostMP){
TempPlayerMPForAnimation=PlayerCurrentMP-MaxHitCostMP;
PlayerCurrentMP=PlayerCurrentMP-MaxHitCostMP;
}//MidHit hit attack
else if ((PlayerCurrentMP>=MidHitCostMP)){
TempPlayerMPForAnimation=PlayerCurrentMP-MidHitCostMP;
PlayerCurrentMP=PlayerCurrentMP-MidHitCostMP;
}//LowHit hit attack
else {
TempPlayerMPForAnimation=PlayerCurrentMP-LowHitCostMP;
PlayerCurrentMP=PlayerCurrentMP-LowHitCostMP;
}
}
if (PlayerCurrentMP<0){PlayerCurrentMP=0;}
if (PlayerCurrentMP>EnemyTotalMP){PlayerCurrentMP=EnemyTotalMP;}
/*
//if Fail:
if (EnemyCurrentHP<=0){
EnemyCurrentHP=0;
stop();
}
*/
if ((parent as MovieClip).bFightSkiper==true){gotoAndPlay("PlayerMPUse");}
- Code: Select All Code
PlayerMPtext.text=String(TempPlayerMPForAnimation);
tFightText.text="Player Use MP - ready to strike";
if ((parent as MovieClip).bFightSkiper==true){gotoAndPlay("PlayerAtcRen");}
- Code: Select All Code
//RanAtk,RanDef
PlayerAtcText.text=String(RanAtk);
tFightText.text=tFightText.text+"\n"+"Player try to attack - his will to attack is:"+String(RanAtk);
if ((parent as MovieClip).bFightSkiper==true){gotoAndPlay("EnemyDefRen");}
- Code: Select All Code
//RanAtk,RanDef
EnemyDefText.text=String(RanDef);
tFightText.text=tFightText.text+"\n"+"Enemy try to Def - his will to Def is:"+String(RanDef);
if ((parent as MovieClip).bFightSkiper==true){gotoAndPlay("EnemyNewHp");}
- Code: Select All Code
//RanAtk,RanDef
if (AttackSuccess==1){tFightText.text=tFightText.text+"\n"+ "oh my God Player Strikes !";}
if (AttackSuccess==0){tFightText.text=tFightText.text+"\n"+ "oh my God Player Miss !";}
if (AttackSuccess==2){tFightText.text=tFightText.text+"\n"+ "Enemy dodge the attack !"+"\n"+"there powers are equal !";}
//if Fail:
if (EnemyCurrentHP<=0){
EnemyCurrentHP=0;
stop();
tFightText.text=tFightText.text+"\n"+"And Player Winns - what a fight !";
}
PlayerMPtext.text=String(PlayerCurrentMP);
EnemyHPtext.text=String(EnemyCurrentHP);
//скипер
if ((parent as MovieClip).bFightSkiper==true){
if (EnemyCurrentHP<=0){stop();}
else {gotoAndPlay("EnemyRetext");}
}
The same for enemy but a little changes in names of vars.