public override void Action(object info = null) { base.Action(info); Player opponent = PlayerCallerOfAbility.Equals(GameplayManager.CurrentPlayer) ? GameplayManager.OpponentPlayer : GameplayManager.CurrentPlayer; foreach (Enumerators.AbilityTargetType target in AbilityTargetTypes) { switch (target) { case Enumerators.AbilityTargetType.OPPONENT_ALL_CARDS: foreach (BoardUnit unit in opponent.BoardCards) { BattleController.AttackUnitByAbility(GetCaller(), AbilityData, unit); } foreach (BoardUnit unit in opponent.BoardCards) { unit.Stun(Enumerators.StunType.FREEZE, Value); } break; case Enumerators.AbilityTargetType.OPPONENT: BattleController.AttackPlayerByAbility(GetCaller(), AbilityData, opponent); opponent.Stun(Enumerators.StunType.FREEZE, Value); break; } } }
public override void Action(object info = null) { base.Action(info); BattleController.AttackUnitByAbility(AbilityUnitOwner, AbilityData, AbilityUnitOwner); CreateVfx(AbilityUnitOwner.Transform.position, true, 5f); }
public override void Action(object info = null) { base.Action(info); List <object> allies = new List <object>(); allies.AddRange(GetOpponentOverlord().BoardCards); allies.Add(GetOpponentOverlord()); allies = InternalTools.GetRandomElementsFromList(allies, 1); for (int i = 0; i < allies.Count; i++) { if (allies[i] is Player) { BattleController.AttackPlayerByAbility(GetCaller(), AbilityData, allies[i] as Player); CreateVfx((allies[i] as Player).AvatarObject.transform.position, true, 5f, true); } else if (allies[i] is BoardUnit) { BattleController.AttackUnitByAbility(GetCaller(), AbilityData, allies[i] as BoardUnit); CreateVfx((allies[i] as BoardUnit).Transform.position, true, 5f); } } }
public override void Action(object info = null) { base.Action(info); BoardUnit unit = info as BoardUnit; Player playerOwner = unit.OwnerPlayer; BoardUnit leftAdjustment = null, rightAdjastment = null; int targetIndex = -1; List <BoardUnit> list = null; for (int i = 0; i < playerOwner.BoardCards.Count; i++) { if (playerOwner.BoardCards[i] == unit) { targetIndex = i; list = playerOwner.BoardCards; break; } } object caller = AbilityUnitOwner != null ? AbilityUnitOwner : (object)BoardSpell; if (targetIndex > -1) { if (targetIndex - 1 > -1) { leftAdjustment = list[targetIndex - 1]; } if (targetIndex + 1 < list.Count) { rightAdjastment = list[targetIndex + 1]; } } if (leftAdjustment != null) { CreateAndMoveParticle( () => { BattleController.AttackUnitByAbility(caller, AbilityData, leftAdjustment); }, leftAdjustment.Transform.position); } if (rightAdjastment != null) { CreateAndMoveParticle( () => { BattleController.AttackUnitByAbility(caller, AbilityData, rightAdjastment); }, rightAdjastment.Transform.position); } }
private void ActionEnd() { if (TargetUnit != null) { BattleController.AttackUnitByAbility(TargetUnit, AbilityData, TargetUnit, Damage); CreateVfx(TargetUnit.Transform.position, true, 5f); } }
private void ActionCompleted() { object caller = AbilityUnitOwner != null ? AbilityUnitOwner : (object)BoardSpell; switch (AffectObjectType) { case Enumerators.AffectObjectType.PLAYER: BattleController.AttackPlayerByAbility(caller, AbilityData, TargetPlayer); break; case Enumerators.AffectObjectType.CHARACTER: BattleController.AttackUnitByAbility(caller, AbilityData, TargetUnit); break; } Vector3 targetPosition = VfxObject.transform.position; ClearParticles(); switch (AbilityEffectType) { case Enumerators.AbilityEffectType.TARGET_ROCK: VfxObject = LoadObjectsManager.GetObjectByPath <GameObject>("Prefabs/VFX/toxicDamageVFX"); break; case Enumerators.AbilityEffectType.TARGET_FIRE: VfxObject = LoadObjectsManager.GetObjectByPath <GameObject>("Prefabs/VFX/toxicDamageVFX"); break; case Enumerators.AbilityEffectType.TARGET_LIFE: VfxObject = LoadObjectsManager.GetObjectByPath <GameObject>("Prefabs/VFX/toxicDamageVFX"); break; case Enumerators.AbilityEffectType.TARGET_TOXIC: VfxObject = LoadObjectsManager.GetObjectByPath <GameObject>("Prefabs/VFX/toxicDamageVFX"); break; } if (VfxObject != null) { VfxObject = Object.Instantiate(VfxObject); VfxObject.transform.position = targetPosition; ParticlesController.RegisterParticleSystem(VfxObject, true); } }
private void Action() { object caller = AbilityUnitOwner != null ? AbilityUnitOwner : (object)BoardSpell; Player opponent = PlayerCallerOfAbility == GameplayManager.CurrentPlayer ? GameplayManager.OpponentPlayer : GameplayManager.CurrentPlayer; foreach (Enumerators.AbilityTargetType target in AbilityTargetTypes) { switch (target) { case Enumerators.AbilityTargetType.OPPONENT_ALL_CARDS: foreach (BoardUnit cardOpponent in opponent.BoardCards) { BattleController.AttackUnitByAbility(caller, AbilityData, cardOpponent); } CreateVfx(Vector3.up * 1.5f); break; case Enumerators.AbilityTargetType.PLAYER_ALL_CARDS: foreach (BoardUnit cardPlayer in PlayerCallerOfAbility.BoardCards) { BattleController.AttackUnitByAbility(caller, AbilityData, cardPlayer); CreateVfx(cardPlayer.Transform.position); } break; case Enumerators.AbilityTargetType.OPPONENT: BattleController.AttackPlayerByAbility(caller, AbilityData, opponent); break; case Enumerators.AbilityTargetType.PLAYER: BattleController.AttackPlayerByAbility(caller, AbilityData, PlayerCallerOfAbility); break; } } }
protected override void InputEndedHandler() { base.InputEndedHandler(); object caller = AbilityUnitOwner != null ? AbilityUnitOwner : (object)BoardSpell; if (IsAbilityResolved) { switch (AffectObjectType) { case Enumerators.AffectObjectType.CHARACTER: Action(TargetUnit); CreateAndMoveParticle( () => { BattleController.AttackUnitByAbility(caller, AbilityData, TargetUnit); }, TargetUnit.Transform.position); break; } } }
private void TakeDamageToUnit(BoardUnit unit) { BattleController.AttackUnitByAbility(AbilityUnitOwner, AbilityData, unit); CreateVfx(unit.Transform.position, true, 5f); }
public override void Action(object info = null) { base.Action(info); BoardUnit creature = info as BoardUnit; CreateVfx(creature.Transform.position); BoardUnit leftAdjustment = null, rightAdjastment = null; int targetIndex = -1; for (int i = 0; i < creature.OwnerPlayer.BoardCards.Count; i++) { if (creature.OwnerPlayer.BoardCards[i] == creature) { targetIndex = i; } } if (targetIndex > -1) { if (targetIndex - 1 > -1) { leftAdjustment = creature.OwnerPlayer.BoardCards[targetIndex - 1]; } if (targetIndex + 1 < creature.OwnerPlayer.BoardCards.Count) { rightAdjastment = creature.OwnerPlayer.BoardCards[targetIndex + 1]; } } if (leftAdjustment != null) { if (leftAdjustment.IsStun) { BattleController.AttackUnitByAbility(AbilityUnitOwner, AbilityData, leftAdjustment); } else { leftAdjustment.Stun(Enumerators.StunType.FREEZE, 1); } } if (rightAdjastment != null) { if (rightAdjastment.IsStun) { BattleController.AttackUnitByAbility(AbilityUnitOwner, AbilityData, rightAdjastment); } else { rightAdjastment.Stun(Enumerators.StunType.FREEZE, 1); } } if (creature.IsStun) { BattleController.AttackUnitByAbility(AbilityUnitOwner, AbilityData, creature); } else { creature.Stun(Enumerators.StunType.FREEZE, 1); } }