002- Sleep Logic (Patreon)
Published:
2017-09-14 21:57:34
Imported:
2026-06
Content
as y'all know, the last thing that needs to be done for the project this episode is writing the logic for function codes. I'm about 1/4th done so far, somehow. It is just the raw structure, and marcello will be putting it into the code properly for me, since as I've said in the past that much saves me a lot of time. Here's an example of what one of those looks like:
(keep in mind these multipliers are based off of the move's expected % health damage to the opponent, or an equivalent value for non-damaging moves)
- if the opposing pokemon can be put to sleep, and is not under the effects of yawn
- -miniscore = 100
- -miniscore * 1.3
- -if this pokemon has dream eater, nightmare or bad dreams
- --miniscore * 1.5
- -if this pokemon has offensive set up moves
- --miniscore * 1.3
- -if the opponent is at max HP
- --miniscore * 1.2
- -if the opponent has a recovery move
- --miniscore * 1.3
- -ministat = total of all opponents stat stage values
- --if ministat > 0
- --minimini = 5 * ministat
- --minimini + 100
- --minimini / 100
- --miniscore * minimini
- -if the opponent has sleep talk or snore
- --miniscore * 0.1
- -if the opponent has natural cure
- --miniscore * 0.3
- -if the opponent has marvel scale
- --miniscore * 0.7
- -if this pokemon is a wall, cleric, or pivot
- --miniscore * 1.2
- -if this pokemon is faster than the opponent
- --miniscore * 1.3
- -if this pokemon has left overs or an activated poison heal
- --miniscore * 1.2
- -if the opponent is confused
- --miniscore * 0.6
- -if the opponent is attracted
- --miniscore * 0.7
- -if this pokemon's other moves scores are all below 30
- --miniscore * 1.3
- -if this move is
- --sing
- ---and we're in
- ----the big top
- -----miniscore * 2
- ---if the opponent has soundproof
- ----miniscore = 0
- --grasswhistle
- ---and we're in
- ----grassy terrain
- -----miniscore * 1.6
- ---if the opponent has soundproof
- ----miniscore = 0
- --spore
- ---if the opponent has safety goggles, overcoat, or is grass type
- ----miniscore = 0
- --sleep powder
- ---and we're in
- ----swamp or corrosive
- -----miniscore * 2
- ---if the opponent has safety goggles, overcoat, or is grass type
- ----miniscore = 0
- --hypnosis
- ---and we're in
- ----psychic field
- -----miniscore * 1.8
- --dark void
- ---and we're in
- ----dark crystal cavern or new world
- -----miniscore * 2
- ----crystal cavern
- -----miniscore * 1.6
- -if this is a damaging move
- --miniscore - 100
- --miniscore / effect chance
- --miniscore + 100
- --miniscore / 100
- --score * miniscore
- otherwise
- -if this move does not do damage
- --score = 0
casually prays to the patreon gods that the post preserves the formatting
EDIT: the formatting was incredibly not preserved at all and i have not been provided very many tools to correct that...
so, this is basically what i'm doing for the next few weeks. i'll probably be posting more of these because it's all i've gotten. until tomomo~