private void Start()
    {
        BattlefieldUnits.SetUnitAllegiances();
        PlayerController player = Player as PlayerController;

        if (player != null)
        {
            player.SetUnits(BattlefieldUnits.UnitsOf(player.Player));
        }
        player = Enemy as PlayerController;
        if (player != null)
        {
            player.SetUnits(BattlefieldUnits.UnitsOf(player.Player));
        }
        AdvanceUnit();
    }
    protected override void DefaultAction()
    {
        BattlefieldUnits battlefieldUnits = InfoPool.Request <BattlefieldUnits>("Battlefield units");

        foreach (UnitController unit in battlefieldUnits.UnitsOf(_avatarController.Player))
        {
            UnitController sameStupidUnit = unit;
            sameStupidUnit.Attack += 1;
            sameStupidUnit.StatusEffects.Add(new StatusEffect
            {
                Type         = StatusEffectType.AttackUp,
                OwnTurns     = -1,
                GlobalTurns  = 1,
                RemoveEffect = delegate { sameStupidUnit.Attack -= 1; }
            });
        }

        EventPool.Trigger(EventTypes.ActionNoTarget, _avatarController.Player);
        //gameObject.SetActive(false);
    }
Beispiel #3
0
    protected override void DefaultAction()
    {
        BattlefieldUnits battlefieldUnits = InfoPool.Request <BattlefieldUnits>("Battlefield units");

        foreach (UnitController unit in battlefieldUnits.UnitsOf(_unitController.PlayersArmy))
        {
            UnitController sameStupidUnit = unit;
            sameStupidUnit.Initiative += Increase;

            sameStupidUnit.StatusEffects.Add(new StatusEffect
            {
                Type         = StatusEffectType.Eager,
                OwnTurns     = Duration,
                GlobalTurns  = -1,
                RemoveEffect = () => sameStupidUnit.Initiative -= Increase
            });
        }

        EventPool.Trigger(EventTypes.ActionNoTarget, _unitController.PlayersArmy);
    }