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

January 12 2024: Merge with PS #33

Merged
merged 35 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c41410f
update ancient chooseMove code
Rezzo64 Dec 21, 2023
4205e04
update lower tiers tierOrder
Rezzo64 Dec 21, 2023
e0ee4e4
Fix National Dex Doubles teambuilder
KrisXV Dec 25, 2023
24821c5
Fix some minor move animation bugs
KrisXV Dec 25, 2023
d623ccc
Add Stellar type button CSS
KrisXV Dec 25, 2023
de56bff
Hyper Drill and Mighty Cleave only bypass protection (#2203)
pyuk-bot Dec 26, 2023
7ac7a95
Don't crash when spamming join (#2200)
singiamtel Dec 26, 2023
07efb0f
Tooltips: Fix issues with Stellar type (#2199)
Karthik99999 Dec 26, 2023
392eb3a
Fix some icon sheet positioning
Marty-D Dec 27, 2023
ffb4ebe
fix hidden power dropdown behaviour
Rezzo64 Dec 29, 2023
98106fe
Revert "update ancient chooseMove code"
Rezzo64 Dec 29, 2023
f6c5c93
refactor chooseMove Hidden Power
Rezzo64 Dec 29, 2023
635c17c
Revert "refactor chooseMove Hidden Power"
Rezzo64 Dec 29, 2023
b17bef9
correct refactor of hidden power IV DV update
Rezzo64 Dec 29, 2023
61653bd
teambuilder: notify client that IVs are not default for exports
Rezzo64 Dec 29, 2023
29c39bb
update hp type check for validation
Rezzo64 Dec 29, 2023
84d8459
Revert "update hp type check for validation"
Rezzo64 Dec 29, 2023
57c3e5e
update hp type check for validation, fr this time
Rezzo64 Dec 29, 2023
32d247e
Remove empty folder
KrisXV Dec 30, 2023
0da111e
Add Electro Shot animation
KrisXV Dec 30, 2023
1926c68
Reroute <<bugs>> hyperlink
KrisXV Dec 31, 2023
7d19439
Tooltips: Fix Tera BP minimum (#2202)
pyuk-bot Jan 1, 2024
4bb1cdb
Tooltips: Fix Hadron Engine/Orichalcum Pulse modifier (#2205)
MathyFurret Jan 1, 2024
694b4cd
Fix ADV RU teambuilder
KrisXV Jan 1, 2024
7c01546
Memorialize xbossarux
mia-pi-git Jan 5, 2024
0c34eca
Memorialize victoriousbig
Marty-D Jan 6, 2024
3c60577
Client: Fix Undefined usernames on replays (#2209)
Distrib-ps Jan 7, 2024
8820a14
Fix copy replay button functionality (#2195)
malaow3 Jan 7, 2024
17eef20
Support new ability flags (#2210)
Karthik99999 Jan 9, 2024
2cca9bc
Battle-log: Support seeking to a timestamp in <youtube> tags
mia-pi-git Jan 10, 2024
cd181c2
Battle-log: Allow customizing Youtube player size
mia-pi-git Jan 11, 2024
605cabb
Fix BST display in RBY teambuilder
KrisXV Jan 12, 2024
7e3202c
Teambuilder: Fix sorting by BST in RBY
KrisXV Jan 12, 2024
db2c1ba
12 January 2024: Merge with PS
Rezzo64 Jan 12, 2024
4e3031c
Merge branch 'scoopapa:main' into main
Rezzo64 Jan 12, 2024
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
13 changes: 11 additions & 2 deletions build-tools/build-indexes
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ function buildTeambuilderTables() {
const tierTable = {};
const overrideTier = {};
const ubersUUBans = {};
const ndDoublesBans = {};
const monotypeBans = {};
const nonstandardMoves = [];
for (const id of pokemon) {
Expand Down Expand Up @@ -548,8 +549,14 @@ function buildTeambuilderTables() {
if (ubersUU.exists && Dex.formats.getRuleTable(ubersUU).isBannedSpecies(species)) {
ubersUUBans[species.id] = 1;
}
const ndDoubles = Dex.formats.get(gen + 'nationaldexdoubles');
if (ndDoubles.exists && Dex.formats.getRuleTable(ndDoubles).isBannedSpecies(species)) {
ndDoublesBans[species.id] = 1;
}
}
if (genNum >= 5) {
const mono = Dex.formats.get(gen + (isNatDex ? 'nationaldex' : '') + 'monotype');
if (Dex.formats.getRuleTable(mono).isBannedSpecies(species)) {
if (mono.exists && Dex.formats.getRuleTable(mono).isBannedSpecies(species)) {
monotypeBans[species.id] = 1;
}
}
Expand All @@ -570,6 +577,7 @@ function buildTeambuilderTables() {
BattleTeambuilderTable['gen' + genNum + 'natdex'].tiers = tiers;
BattleTeambuilderTable['gen' + genNum + 'natdex'].overrideTier = overrideTier;
BattleTeambuilderTable['gen' + genNum + 'natdex'].items = items;
BattleTeambuilderTable['gen' + genNum + 'natdex'].ndDoublesBans = ndDoublesBans;
BattleTeambuilderTable['gen' + genNum + 'natdex'].monotypeBans = monotypeBans;
BattleTeambuilderTable['gen' + genNum + 'natdex'].formatSlices = formatSlices;
} else if (isMetBattle) {
Expand Down Expand Up @@ -1016,7 +1024,7 @@ function buildTeambuilderTables() {
// Client relevant data that should be overriden by past gens and mods
const overrideSpeciesKeys = ['abilities', 'baseStats', 'cosmeticFormes', 'isNonstandard', 'requiredItems', 'types', 'unreleasedHidden'];
const overrideMoveKeys = ['accuracy', 'basePower', 'category', 'desc', 'flags', 'isNonstandard', 'noSketch', 'pp', 'priority', 'shortDesc', 'target', 'type', 'viable'];
const overrideAbilityKeys = ['desc', 'isNonstandard', 'rating', 'shortDesc'];
const overrideAbilityKeys = ['desc', 'flags', 'isNonstandard', 'rating', 'shortDesc'];
const overrideItemKeys = ['desc', 'isNonstandard', 'rating', 'shortDesc'];

//
Expand Down Expand Up @@ -1652,6 +1660,7 @@ function buildMoves() {
const move = Dex.moves.get(Moves[id].name);
if (move.desc) Moves[id].desc = move.desc;
if (move.shortDesc) Moves[id].shortDesc = move.shortDesc;
if (move.basePowerCallback) Moves[id].basePowerCallback = true;
}
const buf = 'exports.BattleMovedex = ' + es3stringify(Moves) + ';';
fs.writeFileSync('play.pokemonshowdown.com/data/moves.js', buf);
Expand Down
2 changes: 1 addition & 1 deletion play.pokemonshowdown.com/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RewriteRule ^adminrequests?\/?$ https://www.smogon.com/forums/threads/names-pass
RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC]
RewriteRule ^forgotpassword\/?$ https://www.smogon.com/forums/threads/names-passwords-rooms-and-servers-contacting-upper-staff.3538721/post-6227626/ [R=302,L]
RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC]
RewriteRule ^bugs?(reports?)?\/?$ https://www.smogon.com/forums/threads/3663703/ [R=302,L]
RewriteRule ^bugs?(reports?)?\/?$ https://www.smogon.com/forums/ps-bug-report-form/ [R=302,L]
RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC]
RewriteRule ^rules?\/?$ https://pokemonshowdown.com/rules [R=302,L]
RewriteCond %{HTTP_HOST} ^play\.pokemonshowdown\.com$ [NC]
Expand Down
10 changes: 8 additions & 2 deletions play.pokemonshowdown.com/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ function toId() {
var replayLink = 'https://' + Config.routes.replays + '/' + replayid;
$.ajax(replayLink + '.json', {dataType: 'json'}).done(function (replay) {
if (replay) {
var title = replay.p1 + ' vs. ' + replay.p2;
var title = replay.players[0] + ' vs. ' + replay.players[1];
app.receive('>battle-' + replayid + '\n|init|battle\n|title|' + title + '\n' + replay.log);
app.receive('>battle-' + replayid + '\n|expire|<a href=' + replayLink + ' target="_blank" class="no-panel-intercept">Open replay in new tab</a>');
} else {
Expand Down Expand Up @@ -1500,7 +1500,9 @@ function toId() {
if (roomEl && roomEl.id) {
var roomid = roomEl.id.slice(5);
window.app.renameRoom(roomid, target);
window.app.rooms[target].join();
if (window.app.rooms[target]) {
window.app.rooms[target].join();
}
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
Expand Down Expand Up @@ -2555,6 +2557,10 @@ function toId() {
this.$el.html('<form><p style="white-space:pre-wrap;word-wrap:break-word">' + (data.htmlMessage || BattleLog.parseMessage(data.message)) + '</p><p class="buttonbar">' + (data.buttons || '<button type="button" name="close" class="button autofocus"><strong>OK</strong></button>') + '</p></form>').css('max-width', data.maxWidth || 480);
},

copyText: function (value, target) {
app.curRoom.copyText(value, target);
},

dispatchClickButton: function (e) {
var target = e.currentTarget;
if (target.name) {
Expand Down
5 changes: 4 additions & 1 deletion play.pokemonshowdown.com/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,10 @@
}
buf += '<span class="col statcol"><em>Spe</em><br />' + stats.spe + '</span> ';
var bst = 0;
for (i in stats) bst += stats[i];
for (i in stats) {
if (i === 'spd' && gen === 1) continue;
bst += stats[i];
}
buf += '<span class="col bstcol"><em>BST<br />' + bst + '</em></span> ';

buf += '</a></li>';
Expand Down
224 changes: 219 additions & 5 deletions play.pokemonshowdown.com/src/battle-animations-moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2622,6 +2622,9 @@ export const BattleMoveAnims: AnimTable = {
spikyshield: {
anim: BattleOtherAnims.selfstatus.anim,
},
burningbulwark: {
anim: BattleOtherAnims.selfstatus.anim,
},
banefulbunker: {
anim(scene, [attacker]) {
scene.backgroundEffect('linear-gradient(#440044 30%, #000000', 600, 0.2);
Expand Down Expand Up @@ -6951,7 +6954,7 @@ export const BattleMoveAnims: AnimTable = {
lick: {
anim: BattleOtherAnims.contactattack.anim,
},
vicegrip: {
visegrip: {
anim: BattleOtherAnims.contactattack.anim,
},
headbutt: {
Expand Down Expand Up @@ -22864,6 +22867,221 @@ export const BattleMoveAnims: AnimTable = {
},
prepareAnim: BattleOtherAnims.chargestatus.anim,
},
electroshot: {
anim(scene, [attacker, defender]) {
let xstep = (defender.x - attacker.x) / 5;
let ystep = (defender.x - 200 - attacker.x) / 5;
let zstep = (defender.z - attacker.z) / 5;

scene.backgroundEffect('#000000', 900, 0.5);

for (let i = 0; i < 5; i++) {
scene.showEffect('electroball', {
x: attacker.x + xstep * (i + 1),
y: (attacker.y + 200) + ystep * (i + 1),
z: attacker.z + zstep * (i + 1),
scale: 0.7,
opacity: 0.6,
time: 40 * i + 300,
}, {
opacity: 0,
time: 100 * i + 500,
}, 'linear', '', {filter: 'hue-rotate(120deg)'});
}

scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y,
z: attacker.z,
scale: 0.75,
opacity: 0.6,
}, {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 1.25,
opacity: 0,
time: 200,
}, 'decel', '', {filter: 'hue-rotate(120deg)'});
scene.showEffect('wisp', {
x: attacker.x,
y: attacker.y,
z: attacker.z,
scale: 1,
opacity: 0.6,
}, {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 1.5,
opacity: 0,
time: 200,
}, 'decel');

scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 0.4,
opacity: 0.6,
time: 300,
}, {
x: defender.x + 30,
y: defender.y + 30,
z: defender.z,
scale: 0.6,
opacity: 0.3,
time: 500,
}, 'linear', 'explode', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 0.4,
opacity: 0.6,
time: 375,
}, {
x: defender.x + 20,
y: defender.y - 30,
z: defender.z,
scale: 0.6,
opacity: 0.3,
time: 575,
}, 'linear', 'explode');
scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 0.4,
opacity: 0.6,
time: 425,
}, {
x: defender.x - 10,
y: defender.y + 10,
z: defender.z,
scale: 0.6,
opacity: 0.3,
time: 625,
}, 'linear', 'explode');
scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 0.4,
opacity: 0.6,
time: 450,
}, {
x: defender.x - 30,
y: defender.y,
z: defender.z,
scale: 0.6,
opacity: 0.3,
time: 650,
}, 'linear', 'explode', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 0.4,
opacity: 0.6,
time: 500,
}, {
x: defender.x + 10,
y: defender.y - 10,
z: defender.z,
scale: 0.6,
opacity: 0.3,
time: 700,
}, 'linear', 'explode', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 0.4,
opacity: 0.6,
time: 575,
}, {
x: defender.x - 20,
y: defender.y,
z: defender.z,
scale: 0.6,
opacity: 0.3,
time: 775,
}, 'linear', 'explode');
},
prepareAnim(scene, [attacker]) {
scene.showEffect('electroball', {
x: attacker.x - 60,
y: attacker.y + 40,
z: attacker.z,
scale: 0.7,
opacity: 0.7,
time: 0,
}, {
x: attacker.x,
y: attacker.y,
scale: 0.2,
opacity: 0.2,
time: 300,
}, 'linear', 'fade', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x + 60,
y: attacker.y - 5,
z: attacker.z,
scale: 0.7,
opacity: 0.7,
time: 100,
}, {
x: attacker.x,
y: attacker.y,
scale: 0.2,
opacity: 0.2,
time: 300,
}, 'linear', 'fade', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x - 30,
y: attacker.y + 60,
z: attacker.z,
scale: 0.7,
opacity: 0.7,
time: 100,
}, {
x: attacker.x,
y: attacker.y,
scale: 0.2,
opacity: 0.2,
time: 400,
}, 'linear', 'fade', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x + 20,
y: attacker.y - 50,
z: attacker.z,
scale: 0.7,
opacity: 0.7,
time: 100,
}, {
x: attacker.x,
y: attacker.y,
scale: 0.2,
opacity: 0.2,
time: 400,
}, 'linear', 'fade', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x - 70,
y: attacker.y - 50,
z: attacker.z,
scale: 0.7,
opacity: 0.7,
time: 200,
}, {
x: attacker.x,
y: attacker.y,
scale: 0.2,
opacity: 0.2,
time: 500,
}, 'linear', 'fade', {filter: 'hue-rotate(120deg)'});
},
},
solarblade: {
anim(scene, [attacker, defender]) {
let xstep = 0;
Expand Down Expand Up @@ -35893,7 +36111,3 @@ BattleMoveAnims['trailblaze'] = {anim: BattleMoveAnims['powerwhip'].anim};
BattleMoveAnims['tripledive'] = {anim: BattleMoveAnims['dive'].anim};
BattleMoveAnims['hydrosteam'] = {anim: BattleMoveAnims['steameruption'].anim};
BattleMoveAnims['psyblade'] = {anim: BattleMoveAnims['psychocut'].anim};
BattleMoveAnims['electroshot'] = {
anim: BattleMoveAnims['zapcannon'].anim,
prepareAnim: BattleOtherAnims.lightstatus.anim,
};
Loading
Loading