Implement various terrain-related abilities
Fully implements Electric, Psychic, Misty, and Grassy Surge. Partially implements Grass Pelt, Surge Surfer, and Hadron Engine, as their stat-boosting properties don't seem to work as intended.
This commit is contained in:
1 parent
b12ade22e9
commit
9384344758
2 files changed
+42
-8
No files matched your search
@@ -26,6 +26,10 @@ export class Terrain {
|
||||
|
||||
getAttackTypeMultiplier(attackType: Type): number {
|
||||
switch (this.terrainType) {
|
||||
case TerrainType.ELECTRIC:
|
||||
if (attackType === Type.ELECTRIC)
|
||||
return 1.3;
|
||||
break;
|
||||
case TerrainType.GRASSY:
|
||||
if (attackType === Type.GRASS)
|
||||
return 1.3;
|
||||
|
||||
Reference in new issue
Block a user