Fix charge

pull/614/head
Temps Ray 2024-05-07 16:58:52 -04:00
parent cc3113ff43
commit 6cc1773459
2 changed files with 5 additions and 2 deletions

View File

@ -4745,7 +4745,7 @@ export function initMoves() {
.ignoresVirtual(),
new SelfStatusMove(Moves.CHARGE, Type.ELECTRIC, -1, 20, -1, 0, 3)
.attr(StatChangeAttr, BattleStat.SPDEF, 1, true)
.attr(AddBattlerTagAttr, BattlerTagType.CHARGED, true, true),
.attr(AddBattlerTagAttr, BattlerTagType.CHARGED, true, false),
new StatusMove(Moves.TAUNT, Type.DARK, 100, 20, -1, 0, 3)
.unimplemented(),
new StatusMove(Moves.HELPING_HAND, Type.NORMAL, -1, 20, -1, 5, 3)

View File

@ -1320,9 +1320,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
else {
let typeBoost = source.findTag(t => t instanceof TypeBoostTag && (t as TypeBoostTag).boostedType === type) as TypeBoostTag;
if (typeBoost) {
console.log("AAAAAAAAA");
power.value *= typeBoost.boostValue;
if (typeBoost.oneUse) {
this.removeTag(typeBoost.tagType);
console.log(typeBoost.tagType);
console.log(source);
source.removeTag(typeBoost.tagType);
}
}
const arenaAttackTypeMultiplier = this.scene.arena.getAttackTypeMultiplier(type, source.isGrounded());