ridoy / pokemon-showdown-god-mode Goto Github PK
View Code? Open in Web Editor NEWAutomatic damage calculation plugin for Pokemon Showdown (a popular battle simulator)
Automatic damage calculation plugin for Pokemon Showdown (a popular battle simulator)
Calculate damages before and after mega evolution (which to display?)
Calculate opponent's damages on you if they are or aren't a mega
For some reason I made a lot of the og code with vanilla JS, but honestly should just rewrite what's left of the og code to jquery. For clarity and brevity. While the codebase is still small.
Add functionality so clicking and dragging edge of container will increase/decrease its size
In Gen7 rand bats
{
"name": "Floette",
"speciesForme": "floetteeternal",
"ident": "p1: Floette",
"details": "Floette-Eternal, L80, F",
"searchid": "p1: Floette|Floette-Eternal, L80, F",
"slot": 0,
"fainted": false,
"hp": 100,
"maxhp": 100,
"level": 80,
"gender": "F",
"shiny": false,
"hpcolor": "",
"moves": [],
"ability": "",
"baseAbility": "",
"item": "",
"itemEffect": "",
"prevItem": "",
"prevItemEffect": "",
"boosts": {},
"status": "",
"statusStage": 0,
"volatiles": {},
"turnstatuses": {},
"movestatuses": {},
"lastMove": "",
"moveTrack": [],
"statusData": {
"sleepTurns": 0,
"toxicTurns": 0
}
}
I'm avoiding this because gen 8 sucks
I hate dynamax
For some reason Aegislash can't be initialized as a Pokemon object.
The displayDamages logic in damage-calculator.js belongs in window.js (no calculation happens within it, the damage ranges are passed to it by its caller)
Lesson: before building out the whole thing have a good grasp of the components that are needed
Hi, I installed this, joined a gen7 random battle game, but the text area is just blank. No moves, or how much damage, etc.
Make data container element a window that can collapse and be dragged around the screen.
This would be far less annoying than how we have it now: a container pinned to the bottom whose height can be adjusted by dragging up/down.
Sometimes calculations are expected to be inaccurate: the code doesn't yet consider enemy items or abilities. This is okay for now as we display a warning related to this.
There are other times where calculations are off. There are probably multiple causes, so:
Instances:
Not good UI to be loaded with useless information (e.g. that a fainted Pokemon would have been a really good switch-in here)
Damages for Hidden Power and Return are always calculated as 0.
Possible cause: these 2 moves are always serialized as hiddenpower{type}60 and return102 respectively. Need to investigate PS code to see how these are passed into the damage calculator correctly.
Thought this was fixed but Sawsbuck-Autumn just broke it
Guide on how formes are handled in PS : https://github.com/smogon/pokemon-showdown/blob/master/data/FORMES.md
{
abilities: {0: 'Chlorophyll', 1: 'Sap Sipper', H: 'Serene Grace'},
baseForme: "Spring",
baseSpecies: "Sawsbuck",
baseStats: {hp: 80, atk: 100, def: 70, spa: 60, spd: 70, …},
battleOnly: undefined,
bst: 475,
canGigantamax: false,
cannotDynamax: false,
changesFrom: undefined,
color: "Brown",
cosmeticFormes: (3) ['Sawsbuck-Summer', 'Sawsbuck-Autumn', 'Sawsbuck-Winter'],
effectType: "Species",
eggGroups: ['Field'],
evoCondition: "",
evoItem: "",
evoLevel: 34,
evoMove: "",
evoType: "",
evos: null,
exists: true,
forme: "",
formeid: "",
gen: 5,
gender: "",
genderRatio: null,
heightm: 1.9,
id: "sawsbuck",
isMega: false,
isNonstandard: "Past",
isPrimal: false,
isTotem: false,
name: "Sawsbuck",
num: 586,
otherFormes: null,
prevo: "Deerling",
requiredItems: [],
spriteid: "sawsbuck",
tags: [],
tier: "(PU)",
types: (2) ['Normal', 'Grass'],
unreleasedHidden: false,
weightkg: 92.5
}
New Pokemon and movesets are added to random battles data every now and then.
A copy of this data is stored locally, but I just realized its out of date (Rhydon is now in gen7 randbats)
Solution:
Create script that runs perpetually:
calc/data
, do some text processing, saveCurrently only Gen 7 Random Battles is supported.
Two phases:
Indicate if you outspeed your opponent + if they have priority moves
Can use this to, down the road, help suggest moves or suggest a switch
With the codebase expanding it would be good to add some unit testing and other testing
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.