mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Updated and separated the accuracy attribute and the Ice no effect attribute
This commit is contained in:
parent
990eda0aca
commit
da88aa2858
@ -2329,6 +2329,17 @@ export class WaterSuperEffectTypeMultiplierAttr extends VariableMoveTypeMultipli
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class IceNoEffectTypeMultiplierAttr extends VariableMoveTypeMultiplierAttr {
|
||||||
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
|
const multiplier = args[0] as Utils.NumberHolder;
|
||||||
|
if (target.isOfType(Type.ICE)) {
|
||||||
|
multiplier.value *= 0; // Increased twice because initial reduction against water
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class FlyingTypeMultiplierAttr extends VariableMoveTypeMultiplierAttr {
|
export class FlyingTypeMultiplierAttr extends VariableMoveTypeMultiplierAttr {
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
const multiplier = args[0] as Utils.NumberHolder;
|
const multiplier = args[0] as Utils.NumberHolder;
|
||||||
@ -2351,18 +2362,17 @@ export class OneHitKOAccuracyAttr extends VariableAccuracyAttr {
|
|||||||
export class SheerColdAttr extends OneHitKOAccuracyAttr {
|
export class SheerColdAttr extends OneHitKOAccuracyAttr {
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
const accuracy = args[0] as Utils.NumberHolder;
|
const accuracy = args[0] as Utils.NumberHolder;
|
||||||
if (!target.isOfType(Type.ICE)) {
|
if (user.level < target.level) {
|
||||||
if (user.level < target.level)
|
accuracy.value = 0;
|
||||||
accuracy.value = 0;
|
} else {
|
||||||
else {
|
if (user.isOfType(Type.ICE)) {
|
||||||
if (user.isOfType(Type.ICE))
|
accuracy.value = Math.min(Math.max(30 + 100 * (1 - target.level / user.level), 0), 100);
|
||||||
accuracy.value = Math.min(Math.max(30 + 100 * (1 - target.level / user.level), 0), 100);
|
}
|
||||||
else
|
else {
|
||||||
accuracy.value = Math.min(Math.max(20 + 100 * (1 - target.level / user.level), 0), 100);
|
accuracy.value = Math.min(Math.max(20 + 100 * (1 - target.level / user.level), 0), 100);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4643,7 +4653,8 @@ export function initMoves() {
|
|||||||
new AttackMove(Moves.SAND_TOMB, Type.GROUND, MoveCategory.PHYSICAL, 35, 85, 15, 100, 0, 3)
|
new AttackMove(Moves.SAND_TOMB, Type.GROUND, MoveCategory.PHYSICAL, 35, 85, 15, 100, 0, 3)
|
||||||
.attr(TrapAttr, BattlerTagType.SAND_TOMB)
|
.attr(TrapAttr, BattlerTagType.SAND_TOMB)
|
||||||
.makesContact(false),
|
.makesContact(false),
|
||||||
new AttackMove(Moves.SHEER_COLD, Type.ICE, MoveCategory.SPECIAL, 200, 30, 5, -1, 0, 3)
|
new AttackMove(Moves.SHEER_COLD, Type.ICE, MoveCategory.SPECIAL, 200, 20, 5, -1, 0, 3)
|
||||||
|
.attr(IceNoEffectTypeMultiplierAttr)
|
||||||
.attr(SheerColdAttr),
|
.attr(SheerColdAttr),
|
||||||
new AttackMove(Moves.MUDDY_WATER, Type.WATER, MoveCategory.SPECIAL, 90, 85, 10, 30, 0, 3)
|
new AttackMove(Moves.MUDDY_WATER, Type.WATER, MoveCategory.SPECIAL, 90, 85, 10, 30, 0, 3)
|
||||||
.attr(StatChangeAttr, BattleStat.ACC, -1)
|
.attr(StatChangeAttr, BattleStat.ACC, -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user