public static SingleUnitAttackIntent AttackRandomPc(AbstractBattleUnit source, int damage, int numTimesStruck)
    {
        var target = IntentTargeting.GetRandomLivingPlayerUnit();

        if (target == null)
        {
            return(null);
        }
        return(new SingleUnitAttackIntent(source, target, damage, numTimesStruck));
    }
Esempio n. 2
0
    public static List <AbstractIntent> DebuffRandomOther(AbstractBattleUnit self, AbstractStatusEffect debuff_requiresStacksSet)
    {
        return(new DebuffOtherIntent(self, () =>
        {
            var target = IntentTargeting.GetRandomLivingPlayerUnit();

            ActionManager.Instance.ApplyStatusEffect(target,
                                                     debuff_requiresStacksSet,
                                                     debuff_requiresStacksSet.Stacks);
        }).ToSingletonList <AbstractIntent>());
    }