Skip to content

Commit

Permalink
Gen II: Fix critical hit ratios
Browse files Browse the repository at this point in the history
- High crit moves start at stage 2 (stage 0 being normal moves)
- Focus Energy adds 1 stage
- Lucky Punch and Stick set the stage at 2 and skip the other effects
- Sky Attack is not a high crit move
- Also fix Razor Wind's accuracy
  • Loading branch information
Marty-D committed May 8, 2015
1 parent 413e65b commit b3c0f60
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 4 deletions.
12 changes: 8 additions & 4 deletions mods/gen1/moves.js
Expand Up @@ -214,6 +214,10 @@ exports.BattleMovedex = {
return false;
}
},
crabhammer: {
inherit: true,
critRatio: 2
},
dig: {
inherit: true,
basePower: 100,
Expand Down Expand Up @@ -439,6 +443,7 @@ exports.BattleMovedex = {
},
karatechop: {
inherit: true,
critRatio: 2,
type: "Normal"
},
leechseed: {
Expand Down Expand Up @@ -631,11 +636,11 @@ exports.BattleMovedex = {
},
razorleaf: {
inherit: true,
critRatio: 2,
target: "normal"
},
razorwind: {
inherit: true,
accuracy: 75,
critRatio: 1,
target: "normal"
},
Expand Down Expand Up @@ -744,10 +749,9 @@ exports.BattleMovedex = {
return null;
}
},
skyattack: {
slash: {
inherit: true,
critRatio: 1,
secondary: {}
critRatio: 2
},
softboiled: {
inherit: true,
Expand Down
16 changes: 16 additions & 0 deletions mods/gen2/items.js
Expand Up @@ -81,6 +81,14 @@ exports.BattleItems = {
onModifyAtk: function () {},
onModifySpA: function () {}
},
luckypunch: {
inherit: true,
onModifyMove: function (move, user) {
if (user.template.species === 'Chansey') {
move.critRatio = 3;
}
}
},
lumberry: {
inherit: true,
gen: 2
Expand Down Expand Up @@ -127,6 +135,14 @@ exports.BattleItems = {
inherit: true,
gen: 2
},
stick: {
inherit: true,
onModifyMove: function (move, user) {
if (user.template.species === 'Farfetch\'d') {
move.critRatio = 3;
}
}
},
thickclub: {
inherit: true,
// On Gen 2 this happens in stat calculation directly.
Expand Down
42 changes: 42 additions & 0 deletions mods/gen2/moves.js
Expand Up @@ -2,6 +2,10 @@
* Gen 2 moves
*/
exports.BattleMovedex = {
aeroblast: {
inherit: true,
critRatio: 3
},
bellydrum: {
inherit: true,
onHit: function (target) {
Expand Down Expand Up @@ -29,6 +33,14 @@ exports.BattleMovedex = {
onTryHit: function () {},
effect: {}
},
crabhammer: {
inherit: true,
critRatio: 3
},
crosschop: {
inherit: true,
critRatio: 3
},
dig: {
inherit: true,
effect: {
Expand Down Expand Up @@ -119,6 +131,18 @@ exports.BattleMovedex = {
}
}
},
focusenergy: {
inherit: true,
effect: {
onStart: function (pokemon) {
this.add('-start', pokemon, 'move: Focus Energy');
},
onModifyMovePriority: 1,
onModifyMove: function (move) {
move.critRatio += 1;
}
}
},
highjumpkick: {
inherit: true,
onMoveFail: function (target, source, move) {
Expand All @@ -137,6 +161,10 @@ exports.BattleMovedex = {
}
}
},
karatechop: {
inherit: true,
critRatio: 3
},
leechseed: {
inherit: true,
onHit: function () {},
Expand Down Expand Up @@ -264,6 +292,15 @@ exports.BattleMovedex = {
// Disable does not build
inherit: true
},
razorleaf: {
inherit: true,
critRatio: 3
},
razorwind: {
inherit: true,
accuracy: 75,
critRatio: 3
},
reflect: {
inherit: true,
effect: {
Expand Down Expand Up @@ -316,8 +353,13 @@ exports.BattleMovedex = {
},
skyattack: {
inherit: true,
critRatio: 1,
secondary: {}
},
slash: {
inherit: true,
critRatio: 3
},
sleeptalk: {
inherit: true,
onHit: function (pokemon) {
Expand Down

0 comments on commit b3c0f60

Please sign in to comment.