ability: make technician respect variable power moves (#529)
parent
a27822b624
commit
e1ef3c03de
|
@ -9,7 +9,7 @@ import { BattlerTag } from "./battler-tags";
|
|||
import { BattlerTagType } from "./enums/battler-tag-type";
|
||||
import { StatusEffect, getStatusEffectDescriptor, getStatusEffectHealText } from "./status-effect";
|
||||
import { Gender } from "./gender";
|
||||
import Move, { AttackMove, MoveCategory, MoveFlags, MoveTarget, RecoilAttr, StatusMoveTypeImmunityAttr, FlinchAttr, OneHitKOAttr, HitHealAttr, StrengthSapHealAttr, allMoves, StatusMove } from "./move";
|
||||
import Move, { AttackMove, MoveCategory, MoveFlags, MoveTarget, RecoilAttr, StatusMoveTypeImmunityAttr, FlinchAttr, OneHitKOAttr, HitHealAttr, StrengthSapHealAttr, allMoves, StatusMove, VariablePowerAttr, applyMoveAttrs } from "./move";
|
||||
import { ArenaTagSide, ArenaTrapTag } from "./arena-tag";
|
||||
import { ArenaTagType } from "./enums/arena-tag-type";
|
||||
import { Stat } from "./pokemon-stat";
|
||||
|
@ -3042,7 +3042,11 @@ export function initAbilities() {
|
|||
new Ability(Abilities.STALL, 4)
|
||||
.unimplemented(),
|
||||
new Ability(Abilities.TECHNICIAN, 4)
|
||||
.attr(MovePowerBoostAbAttr, (user, target, move) => move.power <= 60, 1.5),
|
||||
.attr(MovePowerBoostAbAttr, (user, target, move) => {
|
||||
const power = new Utils.NumberHolder(move.power);
|
||||
applyMoveAttrs(VariablePowerAttr, user, target, move, power);
|
||||
return power.value <= 60
|
||||
}, 1.5),
|
||||
new Ability(Abilities.LEAF_GUARD, 4)
|
||||
.attr(StatusEffectImmunityAbAttr)
|
||||
.condition(getWeatherCondition(WeatherType.SUNNY, WeatherType.HARSH_SUN))
|
||||
|
|
Loading…
Reference in New Issue