示例#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);
            }
        }
        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);
            }
        }