mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-04-25 16:14:01 -05:00
Add text for G-Max Steelsurge
Thanks @marty-d for the help on implementing [PARTY].
This commit is contained in:
parent
2185deeb99
commit
0e1657e2a2
|
|
@ -8,6 +8,8 @@ exports.BattleText = {
|
|||
opposingPokemon: "the opposing [NICKNAME]",
|
||||
team: "your team",
|
||||
opposingTeam: "the opposing team",
|
||||
party: "your ally Pok\u00E9mon",
|
||||
opposingParty: "the opposing Pok\u00E9mon",
|
||||
|
||||
turn: "== Turn [NUMBER] ==",
|
||||
switchIn: "[TRAINER] sent out [FULLNAME]!",
|
||||
|
|
@ -529,6 +531,11 @@ exports.BattleText = {
|
|||
geomancy: {
|
||||
prepare: "[POKEMON] is absorbing power!",
|
||||
},
|
||||
gmaxsteelsurge: {
|
||||
start: " Sharp-pointed pieces of steel started floating around [PARTY]!",
|
||||
end: " The pieces of steel surrounding [PARTY] disappeared!",
|
||||
damage: " The sharp steel bit into [POKEMON]!",
|
||||
},
|
||||
grasspledge: {
|
||||
activate: "#waterpledge",
|
||||
start: " A swamp enveloped [TEAM]!",
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ class BattleTextParser {
|
|||
|
||||
fixLowercase(input: string) {
|
||||
if (this.lowercaseRegExp === undefined) {
|
||||
const prefixes = ['pokemon', 'opposingPokemon', 'team', 'opposingTeam'].map(templateId => {
|
||||
const prefixes = ['pokemon', 'opposingPokemon', 'team', 'opposingTeam', 'party', 'opposingParty'].map(templateId => {
|
||||
const template = BattleText.default[templateId];
|
||||
if (template.charAt(0) === template.charAt(0).toUpperCase()) return '';
|
||||
const bracketIndex = template.indexOf('[');
|
||||
|
|
@ -262,6 +262,14 @@ class BattleTextParser {
|
|||
return '';
|
||||
}
|
||||
|
||||
party(side: string) {
|
||||
side = side.slice(0, 2);
|
||||
if (side === (this.perspective === 0 ? 'p1' : 'p2')) {
|
||||
return BattleText.default.party;
|
||||
}
|
||||
return BattleText.default.opposingParty;
|
||||
}
|
||||
|
||||
static effectId(effect?: string) {
|
||||
if (!effect) return '';
|
||||
if (effect.startsWith('item:') || effect.startsWith('move:')) {
|
||||
|
|
@ -706,14 +714,14 @@ class BattleTextParser {
|
|||
let [, side, effect] = args;
|
||||
let template = this.template('start', effect, 'NODEFAULT');
|
||||
if (!template) template = this.template('startTeamEffect').replace('[EFFECT]', this.effect(effect));
|
||||
return template.replace('[TEAM]', this.team(side));
|
||||
return template.replace('[TEAM]', this.team(side)).replace('[PARTY]', this.party(side));
|
||||
}
|
||||
|
||||
case '-sideend': {
|
||||
let [, side, effect] = args;
|
||||
let template = this.template('end', effect, 'NODEFAULT');
|
||||
if (!template) template = this.template('endTeamEffect').replace('[EFFECT]', this.effect(effect));
|
||||
return template.replace('[TEAM]', this.team(side));
|
||||
return template.replace('[TEAM]', this.team(side)).replace('[PARTY]', this.party(side));
|
||||
}
|
||||
|
||||
case '-weather': {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user