Implements infestation (#184)
* Implements infestation * removes partial * wrong partial removed, fixed * appropriate tag location in enum * moved in battle-anim enum
This commit is contained in:
parent
6b46cd533a
commit
aae40d2246
File diff suppressed because it is too large
Load Diff
|
@ -79,6 +79,7 @@ export enum CommonAnim {
|
||||||
MAGMA_STORM,
|
MAGMA_STORM,
|
||||||
CLAMP,
|
CLAMP,
|
||||||
THUNDER_CAGE,
|
THUNDER_CAGE,
|
||||||
|
INFESTATION,
|
||||||
ORDER_UP_CURLY,
|
ORDER_UP_CURLY,
|
||||||
ORDER_UP_DROOPY,
|
ORDER_UP_DROOPY,
|
||||||
ORDER_UP_STRETCHY,
|
ORDER_UP_STRETCHY,
|
||||||
|
|
|
@ -613,6 +613,16 @@ export class ThunderCageTag extends DamagingTrapTag {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class InfestationTag extends DamagingTrapTag {
|
||||||
|
constructor(turnCount: integer, sourceId: integer) {
|
||||||
|
super(BattlerTagType.INFESTATION, CommonAnim.INFESTATION, turnCount, Moves.INFESTATION, sourceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
getTrapMessage(pokemon: Pokemon): string {
|
||||||
|
return getPokemonMessage(pokemon, ` has been afflicted \nwith an infestation by ${getPokemonPrefix(pokemon.scene.getPokemonById(this.sourceId))}${pokemon.scene.getPokemonById(this.sourceId).name}!`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export class ProtectedTag extends BattlerTag {
|
export class ProtectedTag extends BattlerTag {
|
||||||
constructor(sourceMove: Moves, tagType: BattlerTagType = BattlerTagType.PROTECTED) {
|
constructor(sourceMove: Moves, tagType: BattlerTagType = BattlerTagType.PROTECTED) {
|
||||||
|
@ -1051,6 +1061,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
|
||||||
return new MagmaStormTag(turnCount, sourceId);
|
return new MagmaStormTag(turnCount, sourceId);
|
||||||
case BattlerTagType.THUNDER_CAGE:
|
case BattlerTagType.THUNDER_CAGE:
|
||||||
return new ThunderCageTag(turnCount, sourceId);
|
return new ThunderCageTag(turnCount, sourceId);
|
||||||
|
case BattlerTagType.INFESTATION:
|
||||||
|
return new InfestationTag(turnCount, sourceId);
|
||||||
case BattlerTagType.PROTECTED:
|
case BattlerTagType.PROTECTED:
|
||||||
return new ProtectedTag(sourceMove);
|
return new ProtectedTag(sourceMove);
|
||||||
case BattlerTagType.SPIKY_SHIELD:
|
case BattlerTagType.SPIKY_SHIELD:
|
||||||
|
|
|
@ -22,6 +22,7 @@ export enum BattlerTagType {
|
||||||
SAND_TOMB = "SAND_TOMB",
|
SAND_TOMB = "SAND_TOMB",
|
||||||
MAGMA_STORM = "MAGMA_STORM",
|
MAGMA_STORM = "MAGMA_STORM",
|
||||||
THUNDER_CAGE = "THUNDER_CAGE",
|
THUNDER_CAGE = "THUNDER_CAGE",
|
||||||
|
INFESTATION = "INFESTATION",
|
||||||
PROTECTED = "PROTECTED",
|
PROTECTED = "PROTECTED",
|
||||||
SPIKY_SHIELD = "SPIKY_SHIELD",
|
SPIKY_SHIELD = "SPIKY_SHIELD",
|
||||||
KINGS_SHIELD = "KINGS_SHIELD",
|
KINGS_SHIELD = "KINGS_SHIELD",
|
||||||
|
|
|
@ -2459,6 +2459,7 @@ export class AddBattlerTagAttr extends MoveEffectAttr {
|
||||||
case BattlerTagType.SAND_TOMB:
|
case BattlerTagType.SAND_TOMB:
|
||||||
case BattlerTagType.MAGMA_STORM:
|
case BattlerTagType.MAGMA_STORM:
|
||||||
case BattlerTagType.THUNDER_CAGE:
|
case BattlerTagType.THUNDER_CAGE:
|
||||||
|
case BattlerTagType.INFESTATION:
|
||||||
return -3;
|
return -3;
|
||||||
case BattlerTagType.ENCORE:
|
case BattlerTagType.ENCORE:
|
||||||
return -2;
|
return -2;
|
||||||
|
@ -4160,7 +4161,18 @@ export function initMoves() {
|
||||||
.partial(),
|
.partial(),
|
||||||
new AttackMove(Moves.RAPID_SPIN, Type.NORMAL, MoveCategory.PHYSICAL, 50, 100, 40, 100, 0, 2)
|
new AttackMove(Moves.RAPID_SPIN, Type.NORMAL, MoveCategory.PHYSICAL, 50, 100, 40, 100, 0, 2)
|
||||||
.attr(StatChangeAttr, BattleStat.SPD, 1, true)
|
.attr(StatChangeAttr, BattleStat.SPD, 1, true)
|
||||||
.attr(RemoveBattlerTagAttr, [ BattlerTagType.BIND, BattlerTagType.WRAP, BattlerTagType.FIRE_SPIN, BattlerTagType.WHIRLPOOL, BattlerTagType.CLAMP, BattlerTagType.SAND_TOMB, BattlerTagType.MAGMA_STORM, BattlerTagType.THUNDER_CAGE, BattlerTagType.SEEDED ], true)
|
.attr(RemoveBattlerTagAttr, [
|
||||||
|
BattlerTagType.BIND,
|
||||||
|
BattlerTagType.WRAP,
|
||||||
|
BattlerTagType.FIRE_SPIN,
|
||||||
|
BattlerTagType.WHIRLPOOL,
|
||||||
|
BattlerTagType.CLAMP,
|
||||||
|
BattlerTagType.SAND_TOMB,
|
||||||
|
BattlerTagType.MAGMA_STORM,
|
||||||
|
BattlerTagType.THUNDER_CAGE,
|
||||||
|
BattlerTagType.SEEDED,
|
||||||
|
BattlerTagType.INFESTATION
|
||||||
|
], true)
|
||||||
.partial(),
|
.partial(),
|
||||||
new StatusMove(Moves.SWEET_SCENT, Type.NORMAL, 100, 20, -1, 0, 2)
|
new StatusMove(Moves.SWEET_SCENT, Type.NORMAL, 100, 20, -1, 0, 2)
|
||||||
.attr(StatChangeAttr, BattleStat.EVA, -1)
|
.attr(StatChangeAttr, BattleStat.EVA, -1)
|
||||||
|
@ -5179,7 +5191,7 @@ export function initMoves() {
|
||||||
.attr(SurviveDamageAttr),
|
.attr(SurviveDamageAttr),
|
||||||
new AttackMove(Moves.INFESTATION, Type.BUG, MoveCategory.SPECIAL, 20, 100, 20, 100, 0, 6)
|
new AttackMove(Moves.INFESTATION, Type.BUG, MoveCategory.SPECIAL, 20, 100, 20, 100, 0, 6)
|
||||||
.makesContact()
|
.makesContact()
|
||||||
.partial(),
|
.attr(TrapAttr, BattlerTagType.INFESTATION),
|
||||||
new AttackMove(Moves.POWER_UP_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 40, 100, 20, 100, 0, 6)
|
new AttackMove(Moves.POWER_UP_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 40, 100, 20, 100, 0, 6)
|
||||||
.attr(StatChangeAttr, BattleStat.ATK, 1, true)
|
.attr(StatChangeAttr, BattleStat.ATK, 1, true)
|
||||||
.punchingMove(),
|
.punchingMove(),
|
||||||
|
@ -5977,7 +5989,18 @@ export function initMoves() {
|
||||||
new AttackMove(Moves.TRIPLE_DIVE, Type.WATER, MoveCategory.PHYSICAL, 30, 95, 10, -1, 0, 9)
|
new AttackMove(Moves.TRIPLE_DIVE, Type.WATER, MoveCategory.PHYSICAL, 30, 95, 10, -1, 0, 9)
|
||||||
.attr(MultiHitAttr, MultiHitType._3),
|
.attr(MultiHitAttr, MultiHitType._3),
|
||||||
new AttackMove(Moves.MORTAL_SPIN, Type.POISON, MoveCategory.PHYSICAL, 30, 100, 15, 100, 0, 9)
|
new AttackMove(Moves.MORTAL_SPIN, Type.POISON, MoveCategory.PHYSICAL, 30, 100, 15, 100, 0, 9)
|
||||||
.attr(LapseBattlerTagAttr, [ BattlerTagType.BIND, BattlerTagType.WRAP, BattlerTagType.FIRE_SPIN, BattlerTagType.WHIRLPOOL, BattlerTagType.CLAMP, BattlerTagType.SAND_TOMB, BattlerTagType.MAGMA_STORM, BattlerTagType.THUNDER_CAGE, BattlerTagType.SEEDED ], true)
|
.attr(LapseBattlerTagAttr, [
|
||||||
|
BattlerTagType.BIND,
|
||||||
|
BattlerTagType.WRAP,
|
||||||
|
BattlerTagType.FIRE_SPIN,
|
||||||
|
BattlerTagType.WHIRLPOOL,
|
||||||
|
BattlerTagType.CLAMP,
|
||||||
|
BattlerTagType.SAND_TOMB,
|
||||||
|
BattlerTagType.MAGMA_STORM,
|
||||||
|
BattlerTagType.THUNDER_CAGE,
|
||||||
|
BattlerTagType.SEEDED,
|
||||||
|
BattlerTagType.INFESTATION
|
||||||
|
], true)
|
||||||
.attr(StatusEffectAttr, StatusEffect.POISON)
|
.attr(StatusEffectAttr, StatusEffect.POISON)
|
||||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||||
new StatusMove(Moves.DOODLE, Type.NORMAL, 100, 10, -1, 0, 9)
|
new StatusMove(Moves.DOODLE, Type.NORMAL, 100, 10, -1, 0, 9)
|
||||||
|
|
Loading…
Reference in New Issue