Пример #1
0
    public override void UseAbility(Unit target)
    {
        base.UseAbility (target);
        Vector3 pos = map.TileCoordToWorldCoord (target.tileX, target.tileY);
        myVisualEffects.Add (effectLib.CreateVisualEffect ("Hit1", pos).GetComponent<EffectController> ());
        int dmg = (int)(damage * myCaster.damageDealtMod);
        myCaster.AddGuardPoints (2);

        // if the target is normal or smaller size
        if (target.mySize <= UnitSize.Normal) {
            int diffX = target.tileX - myCaster.tileX;
            int diffY = target.tileY - myCaster.tileY;

            //deal damage, if not dodged, apply effect
            if (target.TakeDamage(dmg, effectLib.getSoundEffect ("Shield Slam"), true, myCaster) != -1) {
                target.ApplyEffect (new Snare ("Barged", duration, effectLib.getIcon("Barge").sprite));
                target.ShowCombatText ("Snared", myTarget.statusCombatText);
                if (map.UnitCanEnterTile(myCaster.tileX+(diffX*2), myCaster.tileY+(diffY*2))) {
                    target.SlideToTile(myCaster.tileX+(diffX*2), myCaster.tileY+(diffY*2));
                    myCaster.SlideToTile(myCaster.tileX+(diffX), myCaster.tileY+(diffY));
                }
            }
        } else {
            if (target.TakeDamage(dmg, effectLib.getSoundEffect ("Shield Slam"), true, myCaster) != -1) {
                target.ApplyEffect (new Snare ("Barged", duration, effectLib.getIcon("Barge").sprite));
                target.ShowCombatText ("Snared", myTarget.statusCombatText);
            }
        }
    }
Пример #2
0
	public override void RunTrigger (Unit host, Unit attacker = null)
	{
		base.RunTrigger (host, attacker);
		
		host.ApplyEffect(new ManaLeachEffect("Mana Leach", 2, myCaster, 10, 0));
		host.ApplyEffect (new Snare ("Mana Trap", 2));
		host.ShowCombatText ("Snared", host.statusCombatText);
	}
Пример #3
0
	public override void RunEffect(Unit u, bool reapply = false)
    {
        base.RunEffect(u, reapply);

        u.movespeed = -100;
        u.maxAP = -100;
		if (!reapply) {
			u.ShowCombatText ("Stunned " + duration.ToString(), u.statusCombatText);
		}
    }
Пример #4
0
	public override void RunEffect(Unit u, bool reapply = false)
    {
        base.RunEffect(u, reapply);

        u.movespeed = -100;
		u.remainingMove = -100;
		if (!reapply) {
			u.ShowCombatText ("Snared", u.statusCombatText);
		}
    }
Пример #5
0
    public override void UseAbility(Unit target)
    {
        base.UseAbility (target);
        int combo = myCaster.UseGuardPoints ();
        int dmg = (int)(damage * myCaster.damageDealtMod);

        if (target.TakeDamage(dmg * combo, effectLib.getSoundEffect ("Shield Slam"), true, myCaster) != -1) {
            target.ApplyEffect(new Stun("Shield Slammed", (int)(combo / 2), effectLib.getIcon("Shield Slam").sprite));
            target.ShowCombatText ("Stunned", target.statusCombatText);
        }
    }
Пример #6
0
    public override void UseAbility(Unit target)
    {
        base.UseAbility (target);

        target.ApplyEffect (new MovespeedMod ("Righteous Speed", duration, 1, 1, effectLib.getIcon("Righteous Shield").sprite));
        target.ApplyEffect (new ShieldEffect ("Righteous Shield", shieldDuration, shield, effectLib.getIcon("Righteous Shield").sprite));

        target.ShowCombatText (shield.ToString (), target.statusCombatText);
        target.UpdateHealthBar ();

        Vector3 pos = map.TileCoordToWorldCoord (target.tileX, target.tileY);
        myVisualEffects.Add (effectLib.CreateVisualEffect ("Righteous Shield", pos).GetComponent<EffectController> ());

        myCaster.GetComponent<AudioSource> ().PlayOneShot (effectLib.getSoundEffect ("Righteous Shield"));
    }
Пример #7
0
    public override void UseAbility(Unit target)
    {
        cooldown = maxCooldown;
        AbilityFinished = false;
        myTarget = target;

        int dmg = (int)(damage * myCaster.damageDealtMod);

        //deal damage, if not dodged, apply effect
        if (target.TakeDamage (dmg, null, true, myCaster) != -1) {
            if (target.ApplyEffect (new Stun ("Frozen", duration, effectLib.getIcon("Flash Freeze").sprite))) {
                target.ShowCombatText ("Stunned", target.statusCombatText);
            }
        }
    }