Example #1
0
        private void _addStatusEffect(object[] args)
        { // addStatusEffect(string partyMemberSelector, StatusEffectType statusEffectType)
            string           partyMemberSelector = (string)args[0];
            StatusEffectType statusEffectType    = (StatusEffectType)args[1];

            StatusEffect statusEffect;

            switch (statusEffectType)
            {
            case StatusEffectType.Poison: statusEffect = new StatusEffects.Poison(); break;

            case StatusEffectType.Paralysis: statusEffect = new StatusEffects.Paralysis(); break;

            case StatusEffectType.Fear: statusEffect = new StatusEffects.Fear(actor); break;

            case StatusEffectType.Doom: statusEffect = new StatusEffects.Doom(actor); break;

            default: statusEffect = null; break;
            }

            if (statusEffect != null)
            {
                PartyMember partyMember = getPartyMemberFromSelector(partyMemberSelector);
                partyMember.AddStatusEffect(statusEffect);
            }
        }
Example #2
0
        public void ApplyStatusEffectsFromAttributes(PartyMember inflictor, Attributes attributes, Battle battle)
        {
            bool sameParty = battle.GetPartyForPartyMember(inflictor) == battle.GetPartyForPartyMember(this);

            StatusEffect statusEffect;

            switch (attributes.Status)
            {
            case Status.Poisonous: statusEffect = new StatusEffects.Poison(); break;

            case Status.Shocking: statusEffect = new StatusEffects.Paralysis(); break;

            case Status.Scary: statusEffect = sameParty || !inflictor.Alive ? null : new StatusEffects.Fear(inflictor); break;

            default: statusEffect = null; break;
            }
            if (statusEffect != null)
            {
                AddStatusEffect(statusEffect);
            }

            if (attributes.Affiliation == Affiliation.Doom && !sameParty && inflictor.Alive)
            {
                AddStatusEffect(new StatusEffects.Doom(inflictor));
            }
        }
        private void _addStatusEffect(object[] args)
        {
            // addStatusEffect(string partyMemberSelector, StatusEffectType statusEffectType)
            string partyMemberSelector = (string)args[0];
            StatusEffectType statusEffectType = (StatusEffectType)args[1];

            StatusEffect statusEffect;
            switch (statusEffectType)
            {
            case StatusEffectType.Poison: statusEffect = new StatusEffects.Poison(); break;
            case StatusEffectType.Paralysis: statusEffect = new StatusEffects.Paralysis(); break;
            case StatusEffectType.Fear: statusEffect = new StatusEffects.Fear(actor); break;
            case StatusEffectType.Doom: statusEffect = new StatusEffects.Doom(actor); break;
            default: statusEffect = null; break;
            }

            if (statusEffect != null)
            {
                PartyMember partyMember = getPartyMemberFromSelector(partyMemberSelector);
                partyMember.AddStatusEffect(statusEffect);
            }
        }
        public void ApplyStatusEffectsFromAttributes(PartyMember inflictor, Attributes attributes, Battle battle)
        {
            bool sameParty = battle.GetPartyForPartyMember(inflictor) == battle.GetPartyForPartyMember(this);

            StatusEffect statusEffect;
            switch (attributes.Status)
            {
            case Status.Poisonous: statusEffect = new StatusEffects.Poison(); break;
            case Status.Shocking: statusEffect = new StatusEffects.Paralysis(); break;
            case Status.Scary: statusEffect = sameParty || !inflictor.Alive ? null : new StatusEffects.Fear(inflictor); break;
            default: statusEffect = null; break;
            }
            if (statusEffect != null)
                AddStatusEffect(statusEffect);

            if (attributes.Affiliation == Affiliation.Doom && !sameParty && inflictor.Alive)
                AddStatusEffect(new StatusEffects.Doom(inflictor));
        }