Set message as in the original games, also created
a new attribute for in switch messages to not have the pokemon name required to be on it.pull/765/head
parent
27867faf63
commit
f1b05174a1
|
@ -1368,6 +1368,23 @@ export class PostSummonMessageAbAttr extends PostSummonAbAttr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class PostSummonUnnamedMessageAbAttr extends PostSummonAbAttr {
|
||||||
|
//Attr doesn't force pokemon name on the message
|
||||||
|
private messageFunc: string;
|
||||||
|
|
||||||
|
constructor(messageFunc: string) {
|
||||||
|
super(true);
|
||||||
|
|
||||||
|
this.messageFunc = messageFunc;
|
||||||
|
}
|
||||||
|
|
||||||
|
applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
|
||||||
|
pokemon.scene.queueMessage(this.messageFunc);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class PostSummonAddBattlerTagAbAttr extends PostSummonAbAttr {
|
export class PostSummonAddBattlerTagAbAttr extends PostSummonAbAttr {
|
||||||
private tagType: BattlerTagType;
|
private tagType: BattlerTagType;
|
||||||
private turnCount: integer;
|
private turnCount: integer;
|
||||||
|
@ -2975,7 +2992,7 @@ export function initAbilities() {
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
new Ability(Abilities.AIR_LOCK, 3)
|
new Ability(Abilities.AIR_LOCK, 3)
|
||||||
.attr(SuppressWeatherEffectAbAttr, true)
|
.attr(SuppressWeatherEffectAbAttr, true)
|
||||||
.attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => getPokemonMessage(pokemon, ' is suppressing the weather effects!')),
|
.attr(PostSummonUnnamedMessageAbAttr, "The effects of the weather disappeared."),
|
||||||
new Ability(Abilities.TANGLED_FEET, 4)
|
new Ability(Abilities.TANGLED_FEET, 4)
|
||||||
.conditionalAttr(pokemon => !!pokemon.getTag(BattlerTagType.CONFUSED), BattleStatMultiplierAbAttr, BattleStat.EVA, 2)
|
.conditionalAttr(pokemon => !!pokemon.getTag(BattlerTagType.CONFUSED), BattleStatMultiplierAbAttr, BattleStat.EVA, 2)
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
|
|
Loading…
Reference in New Issue