-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Super Fang & Ruination #576
base: master
Are you sure you want to change the base?
Changes from all commits
b40efad
efbbb0f
90024d1
2b53d0f
4e1e2fa
c239793
e4cd27e
d674289
8331869
1febdfa
717bf06
e76a352
4d53b56
937a130
71aee62
c8f7aed
eff650d
1334562
de99a8f
53f5e42
e18b638
253a0a5
9ffe5c4
2d52226
626cfc7
141c637
aade01c
a9b4b3d
e741861
6aa0eea
52ee339
144d41a
cf9d7bb
5580611
a49a205
c844f08
354ce04
fb68876
f062a32
9983bf2
0483b0b
09d5819
4ff2635
89d01b9
e2aa5ac
13e5a9a
226dcd7
1d016ff
894a5f0
460e753
6e3f932
4076b32
30e5518
1c8c382
07328a7
b44f0ac
f7d49b5
89f6fc2
aab1c21
f6b2ee9
fc8ee14
1ba2a46
65f79ba
ec20f8c
a26de83
6b933d5
78ab355
5e32c5b
e929667
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,12 @@ export function calculateRBYGSC( | |
} | ||
} | ||
|
||
// In Gen 1, Super Fang can hit Ghost types | ||
if (gen.num === 1 && (move.named('Super Fang'))) { | ||
const lostHP = Math.floor(defender.curHP() / 2) || 1; | ||
result.damage = lostHP; | ||
return result; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In Gen 2, you should check if the opposing Pokemon can be hit by Super Fang (probably by And also check if the opposing Pokemon has Protect up just like it's done in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In gen 2 the check for Super fang pass after the check of type effectiveness. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The same goes for the field.defenderSide.isProtected check, so as far i can tell, there is no issue with that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In Gen 2 Super Fang doesn't seem to be ran though.
Yeah there is no issue there. My bad. |
||
|
||
const type1Effectiveness = | ||
getMoveEffectiveness(gen, move, firstDefenderType, field.defenderSide.isForesight); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be missing something but if
defender.curHP() === 1
, doesn't that meanlostHP === 0
?Super Fang should always do 1 damage at least, and will knock out a Pokemon with 1 HP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but
Math.floor(1 / 2) || 1
equals to0 || 1
which evaluates to1
.