Add Focus Band item
This commit is contained in:
1 parent
e7c0c1abd4
commit
c1e048e9af
6 files changed
+65
-14
No files matched your search
@@ -177,9 +177,9 @@ export class ConfusedTag extends BattlerTag {
|
||||
const atk = pokemon.getBattleStat(Stat.ATK);
|
||||
const def = pokemon.getBattleStat(Stat.DEF);
|
||||
const damage = Math.ceil(((((2 * pokemon.level / 5 + 2) * 40 * atk / def) / 50) + 2) * ((Utils.randInt(15) + 85) / 100));
|
||||
pokemon.damage(damage);
|
||||
pokemon.scene.queueMessage('It hurt itself in its\nconfusion!');
|
||||
pokemon.scene.unshiftPhase(new DamagePhase(pokemon.scene, pokemon.isPlayer()));
|
||||
pokemon.damage(damage);
|
||||
(pokemon.scene.getCurrentPhase() as MovePhase).cancel();
|
||||
}
|
||||
}
|
||||
@@ -206,8 +206,8 @@ export class SeedTag extends BattlerTag {
|
||||
pokemon.scene.unshiftPhase(new CommonAnimPhase(pokemon.scene, !pokemon.isPlayer(), CommonAnim.LEECH_SEED));
|
||||
|
||||
const damage = Math.max(Math.floor(pokemon.getMaxHp() / 8), 1);
|
||||
pokemon.damage(damage);
|
||||
pokemon.scene.unshiftPhase(new DamagePhase(pokemon.scene, pokemon.isPlayer()));
|
||||
pokemon.damage(damage);
|
||||
pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, !pokemon.isPlayer(), damage, getPokemonMessage(pokemon, '\'s health is\nsapped by LEECH SEED!'), false, true));
|
||||
}
|
||||
|
||||
@@ -240,8 +240,8 @@ export class NightmareTag extends BattlerTag {
|
||||
pokemon.scene.unshiftPhase(new CommonAnimPhase(pokemon.scene, pokemon.isPlayer(), CommonAnim.CURSE)); // TODO: Update animation type
|
||||
|
||||
const damage = Math.ceil(pokemon.getMaxHp() / 4);
|
||||
pokemon.damage(damage);
|
||||
pokemon.scene.unshiftPhase(new DamagePhase(pokemon.scene, pokemon.isPlayer()));
|
||||
pokemon.damage(damage);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
+3
-3
@@ -746,9 +746,9 @@ export class RecoilAttr extends MoveEffectAttr {
|
||||
return false;
|
||||
|
||||
const recoilDamage = Math.max(Math.floor(user.turnData.damageDealt / 4), 1);
|
||||
user.damage(recoilDamage);
|
||||
user.scene.unshiftPhase(new DamagePhase(user.scene, user.isPlayer(), MoveResult.OTHER));
|
||||
user.scene.queueMessage(getPokemonMessage(user, ' is hit\nwith recoil!'));
|
||||
user.damage(recoilDamage);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -763,8 +763,8 @@ export class SacrificialAttr extends MoveEffectAttr {
|
||||
if (!super.apply(user, target, move, args))
|
||||
return false;
|
||||
|
||||
user.damage(user.getMaxHp());
|
||||
user.scene.unshiftPhase(new DamagePhase(user.scene, user.isPlayer(), MoveResult.OTHER));
|
||||
user.damage(user.getMaxHp());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -959,7 +959,7 @@ export class ClearWeatherAttr extends MoveEffectAttr {
|
||||
|
||||
export class OneHitKOAttr extends MoveHitEffectAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
target.hp = 0;
|
||||
target.damage(target.hp, true);
|
||||
user.scene.queueMessage('It\'s a one-hit KO!');
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user