Ejemplo n.º 1
0
    void BasicSelfHealingAbility(Being b)
    {
        //Create a new ability called Healself
        Ability ab = new Ability(b, "Heal", 100, 1, false);
        //create a condition that MP must not be greater the 5 (the cost)
        ResourceAtValue_Condition gt = new ResourceAtValue_Condition(battleManager, b, "MP greater than 5", "MP", ">", 5);

        HealSelf_Effect        hs = new HealSelf_Effect(battleManager, b, ab, "HealSelf", 10);
        Self_TargetingCriteria s  = new Self_TargetingCriteria(battleManager, b, ab);

        ab.conditions.Add(gt);
        ab.effects.Add(hs);
        ab.targetingCriteria.Add(s);
        b.abilities.Add(ab);
    }
Ejemplo n.º 2
0
    void BasicSelfHealingAbility(Being b)
    {
        //Create a new ability called Healself
        Ability ab = new Ability(b, "Heal", AbilityChassis.Melee, AbilityType.PublicNormal, 100, 1, false);
        //create a condition that MP must not be greater the 5 (the cost)
        ResourceAtValue_Condition gt = new ResourceAtValue_Condition(actionManager, b, "MP greater than 5", "MP", ">", 5);

        HealSelf_Effect        hs = new HealSelf_Effect(actionManager, b, ab, "HealSelf", 10, CombatState.Hit, 0, 0);
        Self_TargetingCriteria s  = new Self_TargetingCriteria(actionManager, b);

        ab.conditions.Add(gt);
        ab.effects.Add(hs);
        ab.targetingCriteria.Add(s);
        b.abilities.Add(ab);
    }