U = UTop;
}
+-(bool)sortEcheck:(ATTACK*)AT opponent:(UNIT*)UT{
+
+ if(AT->riku == FIELD_TYPE_E && UT->C.S_C.typeMOVE == MOVE_TYPE_RIKU)
+ return true;
+ if(AT->umi == FIELD_TYPE_E && UT->C.S_C.typeMOVE == MOVE_TYPE_UMI)
+ return true;
+ if(AT->chu == FIELD_TYPE_E && UT->C.S_C.typeMOVE == MOVE_TYPE_CHU)
+ return true;
+ if(AT->sora == FIELD_TYPE_E && UT->C.S_C.typeMOVE == MOVE_TYPE_SORA)
+ return true;
+
+
+
+ return false;
+}
+
-(void)setBattlePanel{
//おまんちん
U = UTop;
if(mostDmg2 < 0) mostDmg2 = 1;
U = oops;
if(U->C.A->D)
- if(mostDmg < mostDmg2 && U->C.A->rangeA <= unitBreak->atkRange && U->C.A->rangeB >= unitBreak->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostDmg < mostDmg2 && U->C.A->rangeA <= unitBreak->atkRange && U->C.A->rangeB >= unitBreak->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->C.A opponent:U2]){
mostDmg = mostDmg2;
mostNum = num;
}
if(U->C.A->D)
- if(mostHit < U->C.A->hitPercent && hit < 50 && mostDmg/2 < mostDmg2 && U->C.A->rangeA <= unitBreak->atkRange && U->C.A->rangeB >= unitBreak->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostHit < U->C.A->hitPercent && hit < 50 && mostDmg/2 < mostDmg2 && U->C.A->rangeA <= unitBreak->atkRange && U->C.A->rangeB >= unitBreak->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->C.A opponent:U2]){
//mostDmg = U->C.A->totalD;
mostHit = U->C.A->hitPercent;
mostNum = num;
if(u2A->D->sort == 1){
hit = 100;
}
+
+ if([self sortEcheck:u2A opponent:U])
+ hit = 0;
[combatHIT1 setStringValue:[NSString stringWithFormat:@"命中率 %g", hit]];
if(battleDef1Flag || battleDod1Flag) [combatHIT1 setStringValue:[NSString stringWithFormat:@"命中率 ----"]];
U2A = U->C.A;
UNIT *oops = U;
- U = U2;
+ //U = U2;
mostDmg2 = [self dmgResist:mostDmg2];
U = oops;
costVIG = U->C.A->vigor;
if(U->C.A->D)
- if(mostDmg < mostDmg2 && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostDmg < mostDmg2 && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->C.A opponent:U2]){
mostDmg = mostDmg2;
mostNum = num;
}
if(U->C.A->D)
- if(mostHit < U->C.A->hitPercent && hit < 50 && mostDmg/2 < mostDmg2 && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 &&costVIG <= U->C.S_C.vigor){
+ if(mostHit < U->C.A->hitPercent && hit < 50 && mostDmg/2 < mostDmg2 && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 &&costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->C.A opponent:U2]){
//mostDmg = U->C.A->totalD;
mostHit = U->C.A->hitPercent;
mostNum = num;
}
if(U->C.A && U->C.A->D){
- if(U->C.A && !(u2A->D->sort == 1) && U->C.A->D->sort != 1 && mpCost2 <= U->C.S_C.MP && costVIG <= U->C.S_C.vigor){
+ if(U->C.A && !(u2A->D->sort == 1) && U->C.A->D->sort != 1 && mpCost2 <= U->C.S_C.MP && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->C.A opponent:U]){
[combatATK2 setStringValue:[NSString stringWithFormat:@"%@", U->C.A->name]];
hit = U->C.S_C.ACU*U->C.S_C.HIT/100*U->C.S_C.HP/U->C.S_M.HP;
hitFix = U->C.A->hitPercent;
counter = true;
- }else if(u2A->D->sort == 1 || !U->C.A || U->C.A->D->sort == 1){
+ }else if(u2A->D->sort == 1 || !U->C.A || U->C.A->D->sort == 1 || [self sortEcheck:U->C.A opponent:U]){
[combatATK2 setStringValue:[NSString stringWithFormat:@"反撃不可能"]];
}
}else{
[combatATK2 setStringValue:[NSString stringWithFormat:@"反撃不可能"]];
}
-
+ U2A = U->C.A;
U->C.A = aTop2;
if(battleDef2Flag){
if(hit > 100) hit = 100;
if(hit < 0) hit = 0;
+ if([self sortEcheck:U2A opponent:U])
+ hit = 0;
+
[combatHIT2 setStringValue:[NSString stringWithFormat:@"命中率 %g", hit]];
if(battleDef2Flag || battleDod2Flag) [combatHIT2 setStringValue:[NSString stringWithFormat:@"命中率 ----"]];
while(U->CL.A){
mpCost = U->CL.A->EN + U->CL.A->pEN*U->CL.S_M.EN/100 + 0.5;
costVIG = U->C.A->vigor;
- if(mostDmg < U->CL.A->totalD && U->CL.A->rangeA <= unitBreak->atkRange && U->CL.A->rangeB >= unitBreak->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostDmg < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->CL.A opponent:U2]){
mostDmg = U->CL.A->totalD;
mostNum = num;
}
- if(mostHit < U->CL.A->hitPercent && mostDmg/2 < U->CL.A->totalD && U->CL.A->rangeA <= unitBreak->atkRange && U->CL.A->rangeB >= unitBreak->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostHit < U->CL.A->hitPercent && mostDmg/2 < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->CL.A opponent:U2]){
//mostDmg = U->C.A->totalD;
mostHit = U->CL.A->hitPercent;
mostNum = num;
if(u2A->D->sort == 1){
hit = 100;
}
+
+ if([self sortEcheck:u2A opponent:U])
+ hit = 0;
[combatHIT1 setStringValue:[NSString stringWithFormat:@"命中率 %g", hit]];
if(battleDef1Flag || battleDod1Flag) [combatHIT1 setStringValue:[NSString stringWithFormat:@"命中率 ----"]];
costVIG = U->C.A->vigor;
while(U->CL.A){
mpCost = U->CL.A->EN + U->CL.A->pEN*U->CL.S_M.EN/100 + 0.5;
- if(mostDmg < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostDmg < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->CL.A opponent:U2]){
mostDmg = U->CL.A->totalD;
mostNum = num;
}
- if(mostHit < U->CL.A->hitPercent && mostDmg/2 < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostHit < U->CL.A->hitPercent && mostDmg/2 < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->CL.A opponent:U2]){
//mostDmg = U->C.A->totalD;
mostHit = U->CL.A->hitPercent;
mostNum = num;
mpCost2 = U->CL.A->EN + U->CL.A->pEN*U->CL.S_M.EN/100 + 0.5;
}
- if(U->CL.A && !(u2A->D->sort == 1) && U->CL.A->D->sort != 1 && mpCost2 <= U->CL.S_C.EN){
+ if(U->CL.A && !(u2A->D->sort == 1) && U->CL.A->D->sort != 1 && mpCost2 <= U->CL.S_C.EN && ![self sortEcheck:U->CL.A opponent:U2]){
[combatATK2 setStringValue:[NSString stringWithFormat:@"%@", U->CL.A->name]];
hit = U->CL.S_C.MOB + U->C.S_C.HIT;
hitFix = U->CL.A->hitPercent;
counter = true;
- }else if(u2A->D->sort == 1 || !U->CL.A || U->CL.A->D->sort == 1){
+ }else if(u2A->D->sort == 1 || !U->CL.A || U->CL.A->D->sort == 1 || [self sortEcheck:U->CL.A opponent:U2]){
[combatATK2 setStringValue:[NSString stringWithFormat:@"反撃不可能"]];
}
}else{
[combatATK2 setStringValue:[NSString stringWithFormat:@"反撃不可能"]];
}
+ U2A = U->CL.A;
U->CL.A = aTop2;
if(battleDef2Flag){
if(hit > 100) hit = 100;
if(hit < 0) hit = 0;
-
+ if([self sortEcheck:U2A opponent:U])
+ hit = 0;
[combatHIT2 setStringValue:[NSString stringWithFormat:@"命中率 %g", hit]];
if(battleDef2Flag || battleDod2Flag) [combatHIT2 setStringValue:[NSString stringWithFormat:@"命中率 ----"]];
costVIG = U->C.A->vigor;
if(U->C.A->D)
- if(mostDmg < U->C.A->totalD && U->C.A->rangeA <= unitBreak->atkRange && U->C.A->rangeB >= unitBreak->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostDmg < U->C.A->totalD && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->C.A opponent:U2]){
mostDmg = U->C.A->totalD;
mostNum = num;
}
if(U->C.A->D)
- if(mostHit < U->C.A->hitPercent && mostDmg/2 < U->C.A->totalD && U->C.A->rangeA <= unitBreak->atkRange && U->C.A->rangeB >= unitBreak->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostHit < U->C.A->hitPercent && mostDmg/2 < U->C.A->totalD && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->C.A opponent:U2]){
//mostDmg = U->C.A->totalD;
mostHit = U->C.A->hitPercent;
mostNum = num;
if(u2A->D->sort == 1){
hit = 100;
}
+ if([self sortEcheck:u2A opponent:U])
+ hit = 0;
[combatHIT1 setStringValue:[NSString stringWithFormat:@"命中率 %g", hit]];
if(battleDef1Flag || battleDod1Flag) [combatHIT1 setStringValue:[NSString stringWithFormat:@"命中率 ----"]];
mpCost = U->C.A->MP + U->C.A->pMP*U->C.S_M.MP/100 + 0.5;
if(U->C.A->D)
- if(mostDmg < U->C.A->totalD && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostDmg < U->C.A->totalD && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->C.A opponent:U2]){
mostDmg = U->C.A->totalD;
mostNum = num;
}
if(U->C.A->D)
- if(mostHit < U->C.A->hitPercent && mostDmg/2 < U->C.A->totalD && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostHit < U->C.A->hitPercent && mostDmg/2 < U->C.A->totalD && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && mpCost <= U->C.S_C.MP && U->C.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->C.A opponent:U2]){
//mostDmg = U->C.A->totalD;
mostHit = U->C.A->hitPercent;
mostNum = num;
}
if(U->C.A &&U->C.A->D){
- if(U->C.A && !(u2A->D->sort == 1) && U->C.A->D->sort != 1 && mpCost2 <= U->C.S_C.MP && costVIG <= U->C.S_C.vigor){
+ if(U->C.A && !(u2A->D->sort == 1) && U->C.A->D->sort != 1 && mpCost2 <= U->C.S_C.MP && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->C.A opponent:U2]){
[combatATK2 setStringValue:[NSString stringWithFormat:@"%@", U->C.A->name]];
hit = U->C.S_C.ACU*U->C.S_C.HIT/100*U->C.S_C.HP/U->C.S_M.HP;
hitFix = U->C.A->hitPercent;
counter = true;
- }else if(u2A->D->sort == 1 || !U->C.A || U->C.A->D->sort == 1){
+ }else if(u2A->D->sort == 1 || !U->C.A || U->C.A->D->sort == 1 || [self sortEcheck:U->C.A opponent:U2]){
[combatATK2 setStringValue:[NSString stringWithFormat:@"反撃不可能"]];
}}else{
[combatATK2 setStringValue:[NSString stringWithFormat:@"反撃不可能"]];
}
-
+ U2A = U->C.A;
U->C.A = aTop2;
if(battleDef2Flag){
if(hit > 100) hit = 100;
if(hit < 0) hit = 0;
-
+ if([self sortEcheck:U2A opponent:U])
+ hit = 0;
[combatHIT2 setStringValue:[NSString stringWithFormat:@"命中率 %g", hit]];
if(battleDef2Flag || battleDod2Flag) [combatHIT2 setStringValue:[NSString stringWithFormat:@"命中率 ----"]];
while(U->CL.A){
mpCost = U->CL.A->EN + U->CL.A->pEN*U->CL.S_M.EN/100 + 0.5;
costVIG = U->C.A->vigor;
- if(mostDmg < U->CL.A->totalD && U->CL.A->rangeA <= unitBreak->atkRange && U->CL.A->rangeB >= unitBreak->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostDmg < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self :U->CL.A opponent:U2]){
mostDmg = U->CL.A->totalD;
mostNum = num;
}
- if(mostHit < U->CL.A->hitPercent && mostDmg/2 < U->CL.A->totalD && U->CL.A->rangeA <= unitBreak->atkRange && U->CL.A->rangeB >= unitBreak->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostHit < U->CL.A->hitPercent && mostDmg/2 < U->CL.A->totalD && U->CL.A->rangeA <= unitBreak->atkRange && U->CL.A->rangeB >= unitBreak->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->CL.A opponent:U2]){
//mostDmg = U->C.A->totalD;
mostHit = U->CL.A->hitPercent;
mostNum = num;
if(u2A->D->sort == 1){
hit = 100;
}
+ if([self sortEcheck:u2A opponent:U])
+ hit = 0;
[combatHIT1 setStringValue:[NSString stringWithFormat:@"命中率 %g", hit]];
if(battleDef1Flag || battleDod1Flag) [combatHIT1 setStringValue:[NSString stringWithFormat:@"命中率 ----"]];
while(U->CL.A){
mpCost = U->CL.A->EN + U->CL.A->pEN*U->CL.S_M.EN/100 + 0.5;
costVIG = U->C.A->vigor;
- if(mostDmg < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostDmg < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->CL.A opponent:U2]){
mostDmg = U->CL.A->totalD;
mostNum = num;
}
- if(mostHit < U->CL.A->hitPercent && mostDmg/2 < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor){
+ if(mostHit < U->CL.A->hitPercent && mostDmg/2 < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && mpCost <= U->CL.S_C.EN && U->CL.A->D->sort != 1 && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->CL.A opponent:U2]){
//mostDmg = U->C.A->totalD;
mostHit = U->CL.A->hitPercent;
mostNum = num;
}
if(U->CL.A && U->CL.A->D){
- if(U->CL.A && !(u2A->D->sort == 1) && U->CL.A->D->sort != 1 && mpCost2 <= U->CL.S_C.EN){
+ if(U->CL.A && !(u2A->D->sort == 1) && U->CL.A->D->sort != 1 && mpCost2 <= U->CL.S_C.EN && ![self sortEcheck:U->CL.A opponent:U2]){
[combatATK2 setStringValue:[NSString stringWithFormat:@"%@", U->CL.A->name]];
hit = U->CL.S_C.MOB + U->C.S_C.HIT;
hitFix = U->CL.A->hitPercent;
counter = true;
- }else if(u2A->D->sort == 1 || !U->CL.A || U->CL.A->D->sort == 1){
+ }else if(u2A->D->sort == 1 || !U->CL.A || U->CL.A->D->sort == 1 || [self sortEcheck:U->CL.A opponent:U2]){
[combatATK2 setStringValue:[NSString stringWithFormat:@"反撃不可能"]];
}}else{
[combatATK2 setStringValue:[NSString stringWithFormat:@"反撃不可能"]];
}
-
+ U2A = U->CL.A;
U->CL.A = aTop2;
if(battleDef2Flag){
if(hit > 100) hit = 100;
if(hit < 0) hit = 0;
-
+ if([self sortEcheck:U2A opponent:U])
+ hit = 0;
[combatHIT2 setStringValue:[NSString stringWithFormat:@"命中率 %g", hit]];
if(battleDef2Flag || battleDod2Flag) [combatHIT2 setStringValue:[NSString stringWithFormat:@"命中率 ----"]];
if(U2A->D->sort == 1){
hit = 100;
}
+ if([self sortEcheck:U2A opponent:U])
+ hit = 0;
healFlag = false;
costVIG = U->C.A->vigor;
if(U->C.A->D)
- if(mostDmg < mostDmg2 && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && U->C.A->D->sort != 1 && mpCost <= U->C.S_C.MP && costVIG <= U->C.S_C.vigor){
+ if(mostDmg < mostDmg2 && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && U->C.A->D->sort != 1 && mpCost <= U->C.S_C.MP && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->C.A opponent:U2]){
mostDmg = mostDmg2;
}
if(U->C.A->D){
- if(U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && U->C.A->D->sort != 1){
+ if(U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && U->C.A->D->sort != 1 && ![self sortEcheck:U->C.A opponent:U2]){
}else while(U->C.A){
U->C.A = U->C.A->next;
hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi/10+1)*hit2/hit*10;
if(hit > 100) hit = 100;
if(hit < 0) hit = 0;
+ if([self sortEcheck:U2A opponent:U])
+ hit = 0;
battleDod1Flag = false;
if(U2A->D->sort == 1){
hit = 100;
}
+ if([self sortEcheck:U2A opponent:U])
+ hit = 0;
healFlag = false;
}
while(U->CL.A){
mpCost = floor(U->CL.A->EN + U->CL.A->pEN*U->CL.S_M.EN/100 + 0.5);
- if(mostDmg < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && U->CL.A->D->sort != 1 && mpCost <= U->CL.S_C.EN && costVIG <= U->C.S_C.vigor){
+ if(mostDmg < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && U->CL.A->D->sort != 1 && mpCost <= U->CL.S_C.EN && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->CL.A opponent:U2]){
mostDmg = U->CL.A->totalD;
mostNum = num;
}
U->CL.A = NULL;
}
if(U->CL.A){
- if(U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && U->CL.A->D->sort != 1){
+ if(U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && U->CL.A->D->sort != 1 && ![self sortEcheck:U->CL.A opponent:U2]){
}else while(U->CL.A){
U->CL.A = U->CL.A->next;
}
hit = 60 + hit/(U->CL.S_C.MOB*U->C.S_C.DOD/100)*10 - (U->CL.S_C.MOB*U->C.S_C.DOD/100)/hit*10 + hitFix;
if(hit > 100) hit = 100;
+ if([self sortEcheck:U2A opponent:U])
+ hit = 0;
+
battleDod1Flag = false;
int omg = 100;
if(U2A->D->sort == 1){
hit = 100;
}
+ if([self sortEcheck:U2A opponent:U])
+ hit = 0;
healFlag = false;
mpCost = floor(U->C.A->MP + U->C.A->pMP*U->C.S_M.MP/100 + 0.5);
if(U->C.A->D)
- if(mostDmg < U->C.A->totalD && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && U->C.A->D->sort != 1 && mpCost <= U->C.S_C.MP && costVIG <= U->C.S_C.vigor){
+ if(mostDmg < U->C.A->totalD && U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && U->C.A->D->sort != 1 && mpCost <= U->C.S_C.MP && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->C.A opponent:U2]){
mostDmg = U->C.A->totalD;
mostNum = num;
}
}
if(U->C.A){
if(U->C.A->D){
- if(U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && U->C.A->D->sort != 1){
+ if(U->C.A->rangeA <= U2->atkRange && U->C.A->rangeB >= U2->atkRange && U->C.A->D->sort != 1 && ![self sortEcheck:U->C.A opponent:U2]){
}else while(U->CL.A){
U->C.A = U->C.A->next;
}}
hit = 60 + hit/(U->CL.S_C.MOB*U->C.S_C.DOD/100)*10 - (U->CL.S_C.MOB*U->C.S_C.DOD/100)/hit*10 + hitFix;
if(hit > 100) hit = 100;
+ if([self sortEcheck:U2A opponent:U])
+ hit = 0;
+
battleDod1Flag = false;
int omg = 100;
if(U2A->D->sort == 1){
hit = 100;
}
+ if([self sortEcheck:U2A opponent:U])
+ hit = 0;
healFlag = false;
}
while(U->CL.A){
mpCost = floor(U->CL.A->EN + U->CL.A->pEN*U->CL.S_M.EN/100 + 0.5);
- if(mostDmg < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && U->CL.A->D->sort != 1 && mpCost <= U->CL.S_C.EN && costVIG <= U->C.S_C.vigor){
+ if(mostDmg < U->CL.A->totalD && U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && U->CL.A->D->sort != 1 && mpCost <= U->CL.S_C.EN && costVIG <= U->C.S_C.vigor && ![self sortEcheck:U->CL.A opponent:U2]){
mostDmg = U->CL.A->totalD;
mostNum = num;
}
}
}
- if(U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && U->CL.A->D->sort != 1){
+ if(U->CL.A->rangeA <= U2->atkRange && U->CL.A->rangeB >= U2->atkRange && U->CL.A->D->sort != 1 && ![self sortEcheck:U->CL.A opponent:U2]){
}else while(U->CL.A){
U->CL.A = U->CL.A->next;
}
hit = 60 + hit/hit2*10 - hit2/hit*10 + hitFix - log(hi/10+1)*hit2/hit*10;
if(hit > 100) hit = 100;
+ if([self sortEcheck:U2A opponent:U])
+ hit = 0;
+
battleDod1Flag = false;
int omg = 100;