Beispiel #1
0
        public void Move(Fight fight, int allyFightId)
        {
            int tmpX = fight.SearchByFightId(unitId).X;
            int tmpY = fight.SearchByFightId(unitId).Y;

            fight.SearchByFightId(unitId).Move(fight.SearchByFightId(allyFightId).X + (fight.SearchByFightId(allyFightId).X - fight.SearchByFightId(unitId).X), fight.SearchByFightId(allyFightId).Y + (fight.SearchByFightId(allyFightId).Y - fight.SearchByFightId(unitId).Y));
        }
Beispiel #2
0
 public bool CheckConditionalBuff(Fight fight, Character opponent)
 {
     if (fight.SearchByFightId(unitId).FightHealth >= fight.SearchByFightId(unitId).GetTotalStat(fight, opponent, "Health") / 4)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #3
0
 public bool CheckDoubleStrike(Fight fight, Character opponent)
 {
     if (fight.SearchByFightId(unitId).FightHealth <= fight.SearchByFightId(unitId).GetTotalStat(fight, opponent, "Health") / 4)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
 public override int LaunchUltimate(Fight fight, Character opponent)
 {
     FightCooldown = Cooldown + 1;
     Console.WriteLine(name + " restores " + Values[0] + " hp");
     fight.SearchByFightId(unitId).FightHealth += Values[0];
     if (fight.SearchByFightId(unitId).FightHealth > fight.SearchByFightId(unitId).Health + fight.SearchByFightId(unitId).HealthBuff)
     {
         fight.SearchByFightId(unitId).FightHealth = fight.SearchByFightId(unitId).Health + fight.SearchByFightId(unitId).FightHealth;
     }
     return(Values[1]);
 }
Beispiel #5
0
        public void Move(Fight fight, int allyFightId)
        {
            int tmpX = fight.SearchByFightId(unitId).X;
            int tmpY = fight.SearchByFightId(unitId).Y;

            fight.SearchByFightId(unitId).Move(fight.SearchByFightId(allyFightId).X, fight.SearchByFightId(allyFightId).Y);
            fight.SearchByFightId(fight.SearchByFightId(allyFightId).FightId).Move(tmpX, tmpY);
        }
Beispiel #6
0
        public void ActualizeConditionalValues(Fight fight, Character opponent)
        {
            Values[0] = 0;
            Values[1] = 0;
            Values[2] = 0;
            Values[3] = 0;
            List <int> Allies = fight.GetAlliedCharacterNSpace(unitId, 2);

            if (Allies.ToArray().Length > 0)
            {
                foreach (int fightId in Allies)
                {
                    if (fight.SearchByFightId(fightId).Attack > (fight.SearchByFightId(unitId).Attack + Values[0]))
                    {
                        Values[0] = fight.SearchByFightId(fightId).Attack - fight.SearchByFightId(unitId).Attack;
                    }
                    if (fight.SearchByFightId(fightId).Defense > (fight.SearchByFightId(unitId).Defense + Values[1]))
                    {
                        Values[1] = fight.SearchByFightId(fightId).Defense - fight.SearchByFightId(unitId).Defense;
                    }
                    if (fight.SearchByFightId(fightId).Resistance > (fight.SearchByFightId(unitId).Resistance + Values[2]))
                    {
                        Values[2] = fight.SearchByFightId(fightId).Resistance - fight.SearchByFightId(unitId).Resistance;
                    }
                    if (fight.SearchByFightId(fightId).Speed > (fight.SearchByFightId(unitId).Speed + Values[3]))
                    {
                        Values[3] = fight.SearchByFightId(fightId).Speed - fight.SearchByFightId(unitId).Speed;
                    }
                }
            }
        }
Beispiel #7
0
 public bool CheckDoubleStrike(Fight fight, Character opponent)
 {
     return(fight.SearchByFightId(unitId).FightHealth == fight.SearchByFightId(unitId).GetTotalStat(fight, fight.SearchByFightId(unitId), "Health"));
 }
Beispiel #8
0
 public bool CheckConditionalBuff(Fight fight, Character opponent)
 {
     return(fight.SearchByFightId(unitId).FightHealth == fight.SearchByFightId(unitId).GetTotalStat(fight, fight.SearchByFightId(unitId), "Health"));
 }
 public override int LaunchUltimate(Fight fight, Character opponent)
 {
     FightCooldown = Cooldown + 1;
     Values[0]     = ((int)(fight.SearchByFightId(unitId).Attack * 0.3));
     return(Values[0]);
 }
 public override int LaunchUltimate(Fight fight, Character opponent)
 {
     FightCooldown = Cooldown + 1;
     Values[0]     = ((int)(opponent.GetBlock(fight, fight.SearchByFightId(unitId), fight.SearchByFightId(unitId).WeaponType) * 0.3));
     return(Values[0]);
 }
 public void ActualizeConditionalValues(Fight fight, Character opponent)
 {
     Values[1] = (int)(fight.SearchByFightId(unitId).Attack * 0.3);       // Damage dealt
     Values[0] = (int)((fight.SearchByFightId(unitId).GetTotalStat(fight, opponent, "Attack") + Values[1] - opponent.GetBlock(fight, fight.SearchByFightId(unitId), fight.SearchByFightId(unitId).WeaponType)) * 0.5);
 }
Beispiel #12
0
 public bool CheckValidMovement(Fight fight, int allyFightId)
 {
     return(fight.CheckCanAccessTile(unitId, (fight.SearchByFightId(allyFightId).X + (fight.SearchByFightId(allyFightId).X - fight.SearchByFightId(unitId).X)), fight.SearchByFightId(allyFightId).Y + (fight.SearchByFightId(allyFightId).Y - fight.SearchByFightId(unitId).Y)));
 }
Beispiel #13
0
 public bool CheckValidMovement(Fight fight, int allyFightId)
 {
     return(fight.CheckCanAccessTileSupport(unitId, allyFightId, fight.SearchByFightId(allyFightId).X, fight.SearchByFightId(allyFightId).Y) && fight.CheckCanAccessTileSupport(allyFightId, unitId, fight.SearchByFightId(unitId).X, fight.SearchByFightId(unitId).Y));
 }