示例#1
0
    /// <summary>
    /// Initializes a new instance of the <see cref="StatusEffectEvent"/> class.
    /// </summary>
    /// <param name="srcEntity">Source entity.</param>
    /// <param name="statusEffectProperty">Status effect property.</param>
    /// <param name="statusEventType">Status event type.</param>
    /// <param name="statusType">Status type.</param>
    public StatusEffectEvent(BattleEntity srcEntity, 
	                          StatusEffectProperty statusEffectProperty, 
	                          StatusEventType statusEventType,
	                          StatusEffectType statusType)
    {
        this.SrcEntity = srcEntity;
        this.statusEffectProperty = statusEffectProperty;
        this.statusEventType = statusEventType;
        this.statusType = statusType;
    }
    public void LoadStatusEffectProperty(StatusEffectProperty property, float strength)
    {
        switch(property) {
        case StatusEffectProperty.AGI_MOD:
            mPropertyAdd[(int)CombatPropertyType.AGI] = strength;
            break;
        case StatusEffectProperty.DEX_MOD:
            mPropertyAdd[(int)CombatPropertyType.DEX] = strength;
            break;
        case StatusEffectProperty.STR_MOD:
            mPropertyAdd[(int)CombatPropertyType.STR] = strength;
            break;
        case StatusEffectProperty.VIT_MOD:
            mPropertyAdd[(int)CombatPropertyType.VIT] = strength;
            break;
        case StatusEffectProperty.LUCK_MOD:
            mPropertyAdd[(int)CombatPropertyType.LUCK] = strength;
            break;
        case StatusEffectProperty.INT_MOD:
            mPropertyAdd[(int)CombatPropertyType.INT] = strength;
            break;
        case StatusEffectProperty.WIS_MOD:
            mPropertyAdd[(int)CombatPropertyType.AGI] = strength;
            break;

        case StatusEffectProperty.CRIT_CHANCE:
            mPropertyAdd[(int)CombatPropertyType.CRIT_ACCURACY] = strength;
            break;
        case StatusEffectProperty.CRIT_EVASION:
            mPropertyAdd[(int)CombatPropertyType.CRIT_EVASION] = strength;
            break;
        case StatusEffectProperty.CRIT_POWER:
            mPropertyAdd[(int)CombatPropertyType.CRIT_POWER] = strength;
            break;

        case StatusEffectProperty.SPEED:
        case StatusEffectProperty.NONE:
        case StatusEffectProperty.LOSE_TURN:
        case StatusEffectProperty.HP_REGEN:
        case StatusEffectProperty.HEALING_REDUCTION:
        case StatusEffectProperty.FATIGUE_COST:

        default:
            Logger.d (this, "skipping status effect property: " + property);
            break;
        }
    }