Skip to content
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

Switch hints to use double quotes everywhere #5261

Merged
merged 5 commits into from
Mar 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/mods/gen1/moves.js
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ let BattleMovedex = {
name: "Substitute",
pp: 10,
priority: 0,
volatileStatus: 'Substitute',
volatileStatus: 'substitute',
onTryHit(target) {
if (target.volatiles['substitute']) {
this.add('-fail', target, 'move: Substitute');
Expand Down
9 changes: 5 additions & 4 deletions data/mods/gen1/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ let BattleScripts = {
moveSlot.pp = 63;
pokemon.isStale = 2;
pokemon.isStaleSource = 'ppoverflow';
this.hint('In Gen 1, if a player is forced to use a move with 0 PP, the move will underflow to have 63 PP.');
this.hint("In Gen 1, if a player is forced to use a move with 0 PP, the move will underflow to have 63 PP.");
}
}
this.useMove(move, pokemon, target, sourceEffect);
Expand Down Expand Up @@ -327,7 +327,7 @@ let BattleScripts = {
if (accuracy !== true && !this.randomChance(accuracy, 256)) {
this.attrLastMove('[miss]');
this.add('-miss', pokemon);
if (accuracy === 255) this.hint('In Gen 1, moves with 100% accurracy can still miss 1/256 of the time.');
if (accuracy === 255) this.hint("In Gen 1, moves with 100% accurracy can still miss 1/256 of the time.");
damage = false;
}

Expand Down Expand Up @@ -530,8 +530,9 @@ let BattleScripts = {
if (target.setStatus(moveData.status, pokemon, move)) {
target.removeVolatile('mustrecharge');
this.hint(
'In Gen 1, if a Pokémon that has just used Hyper Beam and has yet to recharge is targeted with a sleep inducing move, ' +
'any other status it may already have will be ignored and sleep will be induced regardless.');
"In Gen 1, if a Pokémon that has just used Hyper Beam and has yet to recharge is targeted with a sleep inducing move, " +
"any other status it may already have will be ignored and sleep will be induced regardless."
);
}
} else if (!target.status) {
if (target.setStatus(moveData.status, pokemon, move)) {
Expand Down
6 changes: 3 additions & 3 deletions data/mods/gen2/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ let BattleScripts = {
if (typeof secondary.chance === 'undefined' || this.randomChance(effectChance, 256)) {
this.moveHit(target, pokemon, move, secondary, true, isSelf);
} else if (effectChance === 255) {
this.hint('In Gen 2, moves with a 100% secondary effect chance will not trigger in 1/256 uses.');
this.hint("In Gen 2, moves with a 100% secondary effect chance will not trigger in 1/256 uses.");
}
}
}
Expand Down Expand Up @@ -602,7 +602,7 @@ let BattleScripts = {
if (move.crit) {
level *= 2;
}
this.hint('Gen 2 Present has a glitched damage calculation using the secondary types of the Pokemon for the Attacker\'s Level and Defender\'s Defense.', true);
this.hint("Gen 2 Present has a glitched damage calculation using the secondary types of the Pokemon for the Attacker's Level and Defender's Defense.", true);
}

// When either attack or defense are higher than 256, they are both divided by 4 and modded by 256.
Expand All @@ -613,7 +613,7 @@ let BattleScripts = {
attack = this.clampIntRange(Math.floor(attack / 4) % 256, 1);
defense = this.clampIntRange(Math.floor(defense / 4) % 256, 1);
if (defense < defenseBefore || attack < attackBefore) {
this.hint('In Gen 2, a stat will rollover if it is larger than 1024.', false, attacker.side.id);
this.hint("In Gen 2, a stat will rollover if it is larger than 1024.", false, attacker.side);
}
}

Expand Down
2 changes: 1 addition & 1 deletion data/mods/gen3/abilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ let BattleAbilities = {
}

if (!activated) {
this.hint('In Gen 3, Intimidate does not activate if every target has a Substitute.', false, pokemon.side.id);
this.hint("In Gen 3, Intimidate does not activate if every target has a Substitute.", false, pokemon.side);
return;
}
this.add('-ability', pokemon, 'Intimidate', 'boost');
Expand Down
4 changes: 2 additions & 2 deletions data/mods/gen4/abilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ let BattleAbilities = {
}

if (!activated) {
this.hint('In Gen 4, Intimidate does not activate if every target has a Substitute (or the Substitute was just broken by U-turn).', false, pokemon.side.id);
this.hint("In Gen 4, Intimidate does not activate if every target has a Substitute (or the Substitute was just broken by U-turn).", false, pokemon.side);
return;
}
this.add('-ability', pokemon, 'Intimidate', 'boost');
Expand All @@ -158,7 +158,7 @@ let BattleAbilities = {
if (target.volatiles['substitute']) {
this.add('-immune', target);
} else if (target.volatiles['substitutebroken'] && target.volatiles['substitutebroken'].move === 'uturn') {
this.hint('In Gen 4, if U-turn breaks Substitute the incoming Intimidate does nothing.');
this.hint("In Gen 4, if U-turn breaks Substitute the incoming Intimidate does nothing.");
} else {
this.boost({atk: -1}, target, pokemon);
}
Expand Down
14 changes: 7 additions & 7 deletions data/mods/ssb/moves.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ let BattleMovedex = {
onTryHit(target, source) {
if (source.name !== 'Bimp') {
this.add('-fail', source);
this.hint('Only Bimp can use Trivia Room.');
this.hint("Only Bimp can use Trivia Room.");
return null;
}
},
Expand Down Expand Up @@ -696,7 +696,7 @@ let BattleMovedex = {
onTryHit(target, source) {
if (source.name !== 'bumbadadabum') {
this.add('-fail', source);
this.hint('Only bumbadadabum can use Wonder Trade.');
this.hint("Only bumbadadabum can use Wonder Trade.");
return null;
}
},
Expand Down Expand Up @@ -2105,7 +2105,7 @@ let BattleMovedex = {
onTryHit(target, source) {
if (source.name !== 'Lycanium Z') {
this.add('-fail', source);
this.hint('Only Lycanium Z can use Purple Pills.');
this.hint("Only Lycanium Z can use Purple Pills.");
return null;
}
},
Expand Down Expand Up @@ -2235,7 +2235,7 @@ let BattleMovedex = {
this.attrLastMove('[still]');
if (pokemon.hp < pokemon.maxhp && pokemon.status !== 'slp' && !pokemon.hasAbility('comatose')) return;
this.add('-fail', pokemon);
this.hint('Nap Time fails if the user has full health, is already asleep, or has Comatose.');
this.hint("Nap Time fails if the user has full health, is already asleep, or has Comatose.");
return null;
},
onPrepareHit(target, source) {
Expand Down Expand Up @@ -3997,7 +3997,7 @@ let BattleMovedex = {
beforeMoveCallback(pokemon) {
if (!pokemon.volatiles['cutieescape'] || !pokemon.volatiles['cutieescape'].tookDamage) {
this.add('-fail', pokemon, 'move: Cutie Escape');
this.hint('Cutie Escape only works when Yuki is hit in the same turn the move is used.');
this.hint("Cutie Escape only works when Yuki is hit in the same turn the move is used.");
return true;
}
},
Expand Down Expand Up @@ -4049,7 +4049,7 @@ let BattleMovedex = {
onTryHit(target, pokemon) {
if (pokemon.name !== 'Zarel') {
this.add('-fail', pokemon);
this.hint('Only Zarel can use Relic Song Dance.');
this.hint("Only Zarel can use Relic Song Dance.");
return null;
}
this.attrLastMove('[still]');
Expand All @@ -4069,7 +4069,7 @@ let BattleMovedex = {
if (pokemon.template.speciesid === 'meloettapirouette') {
pokemon.formeChange('Meloetta');
}
this.hint('Zarel still has the Serene Grace ability.');
this.hint("Zarel still has the Serene Grace ability.");
},
effect: {
duration: 1,
Expand Down
2 changes: 1 addition & 1 deletion data/moves.js
Original file line number Diff line number Diff line change
Expand Up @@ -16779,7 +16779,7 @@ let BattleMovedex = {
pp: 10,
priority: 0,
flags: {snatch: 1, nonsky: 1},
volatileStatus: 'Substitute',
volatileStatus: 'substitute',
onTryHit(target) {
if (target.volatiles['substitute']) {
this.add('-fail', target, 'move: Substitute');
Expand Down
6 changes: 3 additions & 3 deletions sim/battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2994,13 +2994,13 @@ export class Battle extends Dex.ModdedDex {
return false;
}

hint(hint: string, once?: boolean, sideid?: 'p1' | 'p2') {
hint(hint: string, once?: boolean, side?: Side) {
if (this.hints.has(hint)) return;

if (sideid) {
if (side) {
this.add('split');
for (const line of [false, this.sides[0], this.sides[1], true]) {
if (line === true || (line && line.id === sideid)) {
if (line === true || line === side) {
this.add('-hint', hint);
} else {
this.log.push('');
Expand Down