Exemple #1
0
 public ElohimGibor() : base(AbilityType.Passive, "Elohim Gibor")
 {
     OnAwake += () =>
     {
         Active.Phase.PhaseFinished += () =>
         {
             if (_wasDamagedThisTurn)
             {
                 _wasDamagedThisTurn = false;
                 return;
             }
             ++_turnsWithoutBeingHurt;
             if (_turnsWithoutBeingHurt < 2)
             {
                 return;
             }
             ParentCharacter.Heal(ParentCharacter, _amountToHeal);
             _turnsWithoutBeingHurt = 0;
             _amountToHeal          = 0;
         };
         ParentCharacter.AfterBeingDamaged += damage =>
         {
             _amountToHeal         += (int)(damage.Value * Percent / 100f);
             _turnsWithoutBeingHurt = 0;
         };
     };
 }
Exemple #2
0
 public void Click()
 {
     Active.MakeAction();
     GetTargetsInRange().GetCharacters().ForEach(c => ParentCharacter.Heal(c, (int)(c.HealthPoints.BaseValue * HealPercent / 100f)));
     ParentCharacter.Effects.Add(new StatModifier(BonusDuration, BasicAttackRangeBonus, ParentCharacter, StatType.BasicAttackRange, Name));
     ParentCharacter.Attack(this, ParentCharacter, new Damage(ParentCharacter.HealthPoints.BaseValue / 2, DamageType.True));
     Finish();
 }
Exemple #3
0
        private void Use(Character character)
        {
            var dmg = new Damage(Damage, DamageType.Magical);

            ParentCharacter.Attack(this, character, dmg);
            ParentCharacter.Heal(ParentCharacter, dmg.Value);
            Finish();
        }
Exemple #4
0
 public RakudaiKishi() : base(AbilityType.Passive, "Rakudai Kishi")
 {
     OnAwake += () => Game.Players.FindAll(p => p != Owner).ForEach(p =>
                                                                    p.Characters.ForEach(c => c.OnDeath += () =>
     {
         if (!ParentCharacter.IsAlive)
         {
             return;
         }
         ParentCharacter.Heal(ParentCharacter, HealAmount);
     }));
 }
Exemple #5
0
 public override void Awake()
 {
     ParentCharacter.AfterAttack += (character, damage) =>
     {
         var modifier = 1;
         if (character.Effects.ContainsType(typeof(BloodKiss)))//.OfType<Effects.DamageOverTime>().Any(e=>e.Name=="Blood Kiss"))
         {
             modifier = 2;
         }
         var amountToHeal = damage.Value * HealthRegainedPercent / 100 * modifier;
         ParentCharacter.Heal(ParentCharacter, amountToHeal);
     };
 }
Exemple #6
0
//		public override void AttackFriend(Character attackedCharacter, int damage) => ParentCharacter.Heal(attackedCharacter, damage);
        public override void Awake()
        {
            ParentCharacter.CanAttackAllies = true;
            ParentCharacter.BasicAttack     = character =>
            {
                if (character.Owner == ParentCharacter.Owner)
                {
                    ParentCharacter.Heal(character, ParentCharacter.AttackPoints.Value);
                }
                else
                {
                    ParentCharacter.DefaultBasicAttack(character);
                }
            };
        }
Exemple #7
0
 public ReijiMaigo() : base(AbilityType.Passive, "Reiji Maigo")
 {
     OnAwake += () => Active.Phase.PhaseFinished += () =>
     {
         if (_toNextUse != 0)
         {
             --_toNextUse;
             return;
         }
         ParentCharacter.Effects.RemoveAll(e => e.Type == EffectType.Negative);
         ParentCharacter.Heal(ParentCharacter,
                              ParentCharacter.HealthPoints.BaseValue - ParentCharacter.HealthPoints.Value);
         _toNextUse = 5;
     };
 }
Exemple #8
0
 public NineLives() : base(AbilityType.Passive, "Nine Lives")
 {
     OnAwake += () =>
     {
         ParentCharacter.AfterAttack += (character, damage) =>
         {
             if (!ParentCharacter.IsAlive)
             {
                 return;
             }
             int modifier     = (character.Effects.ContainsType(typeof(BloodKiss))) ? 2 : 1;
             int amountToHeal = damage.Value * HealthRegainedPercent / 100 * modifier;
             ParentCharacter.Heal(ParentCharacter, amountToHeal);
         };
     };
 }
Exemple #9
0
 public HPDrain(Character characterThatAttacks, Damage damagePerTick, int cooldown, Character parentCharacter, string name = null) : base(cooldown, parentCharacter, name)
 {
     Name                  = name ?? "HP Drain";
     _damagePerTick        = damagePerTick;
     _characterThatAttacks = characterThatAttacks;
     Type                  = EffectType.Negative;
     Character.VoidDelegate tryToActivateEffect = () =>
     {
         _characterThatAttacks.Attack(ParentCharacter, _damagePerTick);
         if (ParentCharacter.IsAlive)
         {
             ParentCharacter.Heal(_characterThatAttacks, _damagePerTick.Value);
         }
     };
     ParentCharacter.JustBeforeFirstAction += tryToActivateEffect;
     OnRemove += () => ParentCharacter.JustBeforeFirstAction -= tryToActivateEffect;
 }
Exemple #10
0
        public void Run()
        {
            GetTargetsInRange().GetCharacters().ForEach(c => ParentCharacter.Heal(c, HealAmount));
            List <Character> friendsInRange = GetTargetsInRange().WhereOnlyFriendsOf(Owner).GetCharacters();

            friendsInRange.ForEach(TryAddingShield);
            if (IsEnchanted)
            {
                friendsInRange.ForEach(f =>
                {
                    if (f.Effects.Any(e => e.Name == Name))
                    {
                        return;                                // prevent speed stacking
                    }
                    f.Effects.Add(new StatModifier(1, EnchantedSpeedAmount, f, StatType.Speed, Name));
                });
            }
        }
Exemple #11
0
 public override void Awake()
 {
     ParentCharacter.JustBeforeFirstAction += () =>
     {
         ++_turnsWithoutBeingHurt;
         if (_turnsWithoutBeingHurt < 2)
         {
             return;
         }
         ParentCharacter.Heal(ParentCharacter, _amountToHeal);
         _turnsWithoutBeingHurt = 0;
         _amountToHeal          = 0;
     };
     ParentCharacter.AfterBeingDamaged += damage =>
     {
         _amountToHeal         += (int)(damage.Value * Percent / 100f);
         _turnsWithoutBeingHurt = 0;
     };
 }
Exemple #12
0
 public NaturesBeauty() : base(AbilityType.Passive, "Nature's Beauty")
 {
     OnAwake += () =>
     {
         ParentCharacter.CanAttackAllies = true;
         ParentCharacter.BasicAttack     = character =>
         {
             if (character.Owner == ParentCharacter.Owner)
             {
                 ParentCharacter.Heal(character, ParentCharacter.AttackPoints.Value);
                 ParentCharacter.HasUsedBasicAttackInPhaseBefore = true;
                 if (ParentCharacter.HasFreeAttackUntilEndOfTheTurn)
                 {
                     ParentCharacter.HasFreeAttackUntilEndOfTheTurn = false;
                 }
             }
             else
             {
                 ParentCharacter.DefaultBasicAttack(character);
             }
         };
     };
 }
Exemple #13
0
 public void Click()
 {
     Active.MakeAction();
     GetTargetsInRange().GetCharacters().ForEach(c => ParentCharacter.Heal(c, Heal));
     Finish();
 }