public override void ExecuteAndAddEffectToTarget(BaseEffect ActiveSkillEffect, string SkillName) { GlobalContext.OpponentCreature = GlobalContext.Invader; if (ActiveSkillEffect.CanActivate()) { GlobalContext.OpponentCreature.Effects.AddAndExecuteEffect(ActiveSkillEffect, SkillName); } GlobalContext.OpponentCreature = GlobalContext.Defender; if (ActiveSkillEffect.CanActivate()) { GlobalContext.OpponentCreature.Effects.AddAndExecuteEffect(ActiveSkillEffect, SkillName); } }
public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect) { GlobalContext.SetContext(GlobalContext.EffectOwnerSquad, GlobalContext.EffectOwnerUnit, GlobalContext.EffectOwnerCharacter, GlobalContext.EffectOwnerSquad, GlobalContext.EffectOwnerUnit, GlobalContext.EffectOwnerCharacter, GlobalContext.ActiveParser); return(ActiveSkillEffect.CanActivate()); }
public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect) { GlobalContext.OpponentCreature = GlobalContext.Invader; if (ActiveSkillEffect.CanActivate()) { return(true); } GlobalContext.OpponentCreature = GlobalContext.Defender; if (ActiveSkillEffect.CanActivate()) { return(true); } return(false); }
public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect) { for (int P = GlobalContext.Map.ListPlayer.Count - 1; P >= 0; --P) { if (GlobalContext.Map.ListPlayer[P].Team != GlobalContext.Map.ListPlayer[GlobalContext.Map.ActivePlayerIndex].Team) { continue; } for (int S = GlobalContext.Map.ListPlayer[P].ListSquad.Count - 1; S >= 0; --S) { float Distance = Math.Abs(GlobalContext.Map.ActiveSquad.X - GlobalContext.Map.ListPlayer[P].ListSquad[S].X) + Math.Abs(GlobalContext.Map.ActiveSquad.Y - GlobalContext.Map.ListPlayer[P].ListSquad[S].Y); if (Distance > ActiveSkillEffect.Range) { continue; } for (int U = GlobalContext.Map.ListPlayer[P].ListSquad[S].UnitsAliveInSquad - 1; U >= 0; --U) { if (ActiveSkillEffect.CanActivate()) { return(true); } } } } return(false); }
public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect) { for (int U = GlobalContext.EffectOwnerSquad.UnitsAliveInSquad - 1; U >= 0; --U) { if (ActiveSkillEffect.CanActivate()) { return(true); } } return(false); }
public override void ExecuteAndAddEffectToTarget(BaseEffect ActiveSkillEffect, string SkillName) { foreach (Layer ActiveLayer in GlobalContext.Map.ListLayer) { foreach (RobotAnimation ActiveRobot in ActiveLayer.DicRobot.Values) { GlobalContext.Target = ActiveRobot; if (ActiveSkillEffect.CanActivate()) { ActiveRobot.Effects.AddAndExecuteEffect(ActiveSkillEffect, SkillName); } } } }
public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect) { foreach (Layer ActiveLayer in GlobalContext.Map.ListLayer) { foreach (RobotAnimation ActiveRobot in ActiveLayer.DicRobot.Values) { GlobalContext.Target = ActiveRobot; if (ActiveSkillEffect.CanActivate()) { return(true); } } } return(false); }
public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect) { for (int P = GlobalContext.Map.ListPlayer.Count - 1; P >= 0; --P) { if (P != GlobalContext.Map.ActivePlayerIndex) { continue; } for (int S = GlobalContext.Map.ListPlayer[P].ListSquad.Count - 1; S >= 0; --S) { for (int U = GlobalContext.Map.ListPlayer[P].ListSquad[S].UnitsAliveInSquad - 1; U >= 0; --U) { if (ActiveSkillEffect.CanActivate()) { return(true); } } } } return(false); }
public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect) { return(ActiveSkillEffect.CanActivate()); }