public BattleAction(AttackSide side, Type type, TacticsMove atk, TacticsMove def) { this.side = side; this.type = type; attacker = atk; defender = def; weaponAtk = attacker.inventory.GetFirstUsableItemTuple(ItemCategory.WEAPON); weaponDef = defender.inventory.GetFirstUsableItemTuple(ItemCategory.WEAPON); staffAtk = attacker.inventory.GetFirstUsableItemTuple(ItemCategory.SUPPORT); if (defender.currentTile) { terrainDef = defender.currentTile.terrain; } }
public void KnockbackStraight(Vector2 direction, float knockbackDistance, AttackSide attackSide) { knockBack = true; totalTravelDistance = knockbackDistance; knockBackDirection = direction; if (attackSide == AttackSide.horizontal) { recoilState.SetState(new bool[] { true, false }); } else if (attackSide == AttackSide.down) { recoilState.SetState(new bool[] { false, true }); } }
public void SetupTile(BehaviorAction action, UnitBasicProperties properties, AttackSide side) { action.Side = side; if (action is AttackAction) { attack = (AttackAction)action; } else if (action is MovementAction) { movement = (MovementAction)action; } UnitProperties = properties; IsSelected = false; IsDisabled = false; SetupAttack(); }