mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 16:32:16 +02:00
Pushed accurancy change
This commit is contained in:
parent
2fbe3f18ef
commit
990eda0aca
@ -2349,17 +2349,21 @@ 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 (!target.isOfType(Type.ICE)) {
|
||||||
if (user.level < target.level)
|
if (user.level < target.level)
|
||||||
accuracy.value = 0;
|
accuracy.value = 0;
|
||||||
else
|
else {
|
||||||
accuracy.value = Math.min(Math.max(30 + 100 * (1 - target.level / user.level), 0), 100);
|
if (user.isOfType(Type.ICE))
|
||||||
return true;
|
accuracy.value = Math.min(Math.max(30 + 100 * (1 - target.level / user.level), 0), 100);
|
||||||
|
else
|
||||||
|
accuracy.value = Math.min(Math.max(20 + 100 * (1 - target.level / user.level), 0), 100);
|
||||||
}
|
}
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class MissEffectAttr extends MoveAttr {
|
export class MissEffectAttr extends MoveAttr {
|
||||||
|
Loading…
Reference in New Issue
Block a user