Beispiel #1
0
	public static SpellAttack Silence(Unit attacker, Enemy enemy) {
		float damage = 10 + attacker.Attrs ["int"] - enemy.Attrs ["mdef"];

		Buff silence = new Buff (0, 3, (t) => {
			enemy.SetLastTime ();
			enemy.SetRandomSlowpoke ();

			return 1;
		}, enemy);

		return new SpellAttack (40, damage, enemy, silence);
	}
Beispiel #2
0
	public static SpellAttack Confusion(Unit attacker, Enemy enemy) {
		float damage = 10 +
		               attacker.Attrs ["str"] - enemy.Attrs ["pdef"] +
		               attacker.Attrs ["int"] - enemy.Attrs ["mdef"];

		Buff stun = new Buff (0, 5, (t) => {
			enemy.SetLastTime ();
			enemy.SetRandomSlowpoke ();

			int victim = UnityEngine.Random.Range (0, 100);
			Debug.Log (victim);
			if (victim > 50) {
				enemy.damage (5);
			} else {
				attacker.damage (5);
			}

			return 1;
		}, enemy);

		return new SpellAttack (35, damage, enemy, stun);
	}