Commit graph

1075 commits

Author SHA1 Message Date
Kurt
9736efd332 Updates continued
Use clone track bool
could instead track the result for each pkm step instead, for extending
functionality to mass-delete any flagged entry (cleanup).
2019-04-14 16:04:36 -07:00
Kurt
34ea56c2a7 Minor updates
Fresh day, fresh tests of the new code :)
Fix assert conditions
Add extra considerations
Detected clones should be skipped for PID/EC/TID checks -- should
probably detect this a different way rather than checking a computed
string (bool array of flags for the clone check results)
2019-04-14 09:06:43 -07:00
Kurt
3d60bea245 Add savefile-wide pkm legality checks
clone checks, duplicate PID/EC/TID
untested & no gui access for now
2019-04-14 01:06:34 -07:00
Kurt
74a45c436a Remove machoke trade catchrate restriction
reverts to 90
Closes #2282, also evident in RoC's PC files (as 90 catch rate).
2019-04-12 22:46:05 -07:00
Kurt
289a36cbd4 Relocate tables to folder
less overpopulated folders
2019-04-12 14:12:30 -07:00
Kurt
ba2b9ace8d Use byte for pp value storage
more appropriate storage; for 3887 indexes -> saves 11.3KB
2019-04-10 22:05:57 -07:00
Kurt
054d498619 Add vc transfer nature checks
Closes #2279 thanks @SadisticMystic !
2019-04-03 20:13:35 -07:00
Matt
21e7d82468 Update GO shiny banlist (#2278) 2019-04-02 13:59:43 -07:00
Kurt
86db3e85e7 Unban HA g7 monkeys
https://twitter.com/SerebiiNet/status/1111223652178112513
bank gift can breed to pass on HA
2019-03-28 21:44:46 -07:00
Kurt
e83f313281 Remove unnecessary abstraction
less objects with only 1 property/field, less objects created = faster
2019-03-23 18:59:45 -07:00
Kurt
55c7bf9858 Remove unnecessary abstraction
EvolutionSet was just an object that hides an array, with no logic
was planning to use the EvolutionSet to do the evolution checks, but
EvolutionTree was required to connect the evolution chains together
2019-03-23 10:36:28 -07:00
Kurt
41e066c562 Consolidate duplicate logic
Reformat g1/2 evolution data binaries for easy loading
precomputed count => no unnecessary allocation/resizing
2019-03-23 10:05:33 -07:00
Kurt
20f023e619 Reduce allocations
GetMethod used to create new array every time; reuse static hashset
(same arrays)

use scan approach to allocate required count
2019-03-23 01:01:04 -07:00
Kurt
b1ead9e630 Split StringConverter into smaller pieces
reduces loading time (don't have to allocate conversion arrays when
launching a gen7 game), and separates things to easier to manage
locations

reworks gen3 string encode/decode, no longer does 3->4->5 and 5->4->3;
instead goes straight to the end result without an intermediary format.

String sanitization should probably be broken up rather than reused, oh
well.
2019-03-20 21:50:44 -07:00
Kurt
8bc949152d Enhance IEncounterable list summarization
separates by type (wild, egg, etc) then groups by generation, listing
the locations and games that can obtain it in that location
2019-03-19 22:05:13 -07:00
Kurt
7e8154fa62 Make parsing flexible / diacritic insensitive
Flabébé if users manually type it :)
2019-03-18 18:09:48 -07:00
Kurt
53dbdf62f7 Add more test cases, case insensitive parse 2019-03-18 00:04:17 -07:00
Kurt
5e3b390fe1 Add learnability API and tests 2019-03-17 22:19:46 -07:00
Kurt
d975081a86 Add short/long name property differentiation 2019-03-17 22:19:37 -07:00
Kurt
3eed1370c1 Minor simplification
if conditional checks >=3, and all subsequent checks require Valid; add
this to the continue condition, and remove unnecessary comparisons

update some comments
2019-03-16 20:07:30 -07:00
Kurt
9b783dd047 Unban mankey/machop shiny pgo transfers
https://pokemongolive.com/en/post/battleshowdown2019/
Mar. 5, 2019, at 1:00 p.m. PST (GMT −8) to Mar. 12, 2019, at 1:00 p.m.
PDT (GMT −7)
2019-03-05 23:09:39 -08:00
Kurt
51bdd7d67c Unban shiny rattata & pidgey
available on pokemon day 2019
https://twitter.com/SerebiiNet/status/1100138566833852421
2019-02-25 17:09:03 -08:00
Kurt
925167bd33 Fix Invalid/Missing Ribbon string format swap
Thanks TORNADO (discord)
2019-02-24 22:20:02 -08:00
Kurt
30e36579be Misc updates
add more xmldoc
revise some comments for clarity
redo a little bit of logic for perf
rename some methods for better description
2019-02-24 13:57:10 -08:00
Kurt
d792c0d3a0 use u/L
use 'u' to denote uint values, so that less IL ops are required
~(21->17) in the case of IVs
no functional change, just a fun exercise looking at generated IL and
finding ways to use less ops
2019-02-23 15:36:26 -08:00
Kurt
17f954b4e8 Xmldoc
Reorder to match parameter order
add more xmldoc
2019-02-23 14:57:35 -08:00
Kurt
df94afa711 Misc updates
extract some enums to core, use Enum.GetNames to do string fetch
make stamp listbox taller
clean up Display*ID setters
2019-02-21 21:54:41 -08:00
Kurt
5f4241063f Misc verbosity reductions
hide enum name
2019-02-21 20:44:31 -08:00
Kurt
c9e894a46d Misc reductions
hide setters for LegalInfo outside assembly (shouldn't overwrite the
stored values)
update GenNumber to Gen* if appropriate; GenNumber checks for first Gen*
to match, is a little more explicit and quicker than calling twice when
checking a range
2019-02-21 20:41:04 -08:00
Kurt
941b1b5c47 Extract some reused logic
Put the methods in Tables4; kinda breaks the 'only arrays here' rule but
they only reference values in this file(partial class).
2019-02-20 22:10:15 -08:00
Kurt
72ec264f4c Prevent g7 silvally from learning fire/water pledge
https://bulbapedia.bulbagarden.net/wiki/Silvally_(Pok%C3%A9mon)#Trivia
has the two bitflags set but the game only tutors the first bitflag it
sees
2019-02-19 22:57:07 -08:00
Kurt
7c3e5aa83c Make RandomGender a method instead of property
See pkNX for similar change; the functionality is really *method*
2019-02-17 22:13:40 -08:00
Kurt
d1f6a5a3ff Misc clean
no functional change
2019-02-15 11:46:46 -08:00
Kurt
7acdf0d16d Expose parse results for external consumption 2019-02-14 20:14:46 -08:00
Matt
7538a33c81 Update GO shinies (#2260) 2019-02-14 10:49:37 -08:00
Kurt
e79f46673c Refactoring iencounterable->pkm
SetPINGA{S}(pk, criteria) -> pid,iv, nature, gender, ability (stats
future?)
memes aside, this is where criteria data is forced

Split N encounterstatic (has fixed PID and special flag) from
EncounterStaticPID
2019-02-09 11:37:20 -08:00
Kurt
383d4b7700 "" -> string.Empty
be explicit that the string is empty rather than possibly missing
disallow encrypted export for BK4 (they're not encrypted), removes type
check
simplify replaceall in showdownset (don't call ReplaceAll 4x, just get
valid chars and rebuild)
simplify get ribbon sprite name (precompute ToLower and appended values
2019-02-07 21:40:20 -08:00
Kurt
3474d97fb2 Weaken float comparison for weight/height
ThePunish3D was able to find examples with less precise calcs

https://projectpokemon.org/home/forums/topic/46143-bug-in-last-update/?do=findComment&comment=240188
assuming these were unmodified
2019-02-07 16:57:17 -08:00
Kurt
59b41937e1 Misc variable name changes
readability++
2019-02-06 23:28:02 -08:00
Kurt
d03ff30140 Fix ita traded lgpe diglett OT
ty ThePunish3D!

https://projectpokemon.org/home/forums/topic/46143-bug-in-last-update/?do=findComment&comment=240159
2019-02-05 17:09:47 -08:00
Kurt
a97ae79086 Unban m&m go shinies
https://twitter.com/SerebiiNet/status/1092892163782991873
2019-02-05 15:33:59 -08:00
Kurt
29253ed636 More cleaning 2019-02-03 20:28:03 -08:00
Kurt
893f98d667 Misc clarity
no functional change
make batch editor prefix list readonly
2019-02-03 10:28:33 -08:00
Kurt
2eef523475 Misc clean
meh
2019-02-02 15:20:08 -08:00
Kurt
f481404503 Misc clean 2019-02-02 10:19:41 -08:00
Kurt
6ed9f979de Continued refactoring
removing null results as indicators of no data (c# 8 sooooon)
2019-02-01 23:26:43 -08:00
Kurt
aa022fad40 Misc refactoring
remove some null usages, return an empty array instead
reduce as arg
2019-02-01 23:08:03 -08:00
Kurt
6353e8d84d Add special set operation for alph rocksmash
closes #2253
ty @Subject21J & @ReignOfComputer
2019-01-27 11:08:21 -08:00
Kurt
147b676d8c Misc api accessibility tweaks
disable GeneratePKMs from throwing an exception (it's a testing flag,
not to leak out if someone wants a debug dll I guess)
expose FixedGenderFromBiGender
expose ribbon interfaces
2019-01-26 14:48:32 -08:00
Kurt
c033fe2741 Increase precision for cp/size calc
still isn't close enough, but removes the usage of decimals for cp calc.
redd.it/ahac9i

CP calc doesn't flag anything I have that is legal, but the calc is
still off by 2 bits at most... whyyyy? Even the same code run in cpp
results in the same inaccuracy? Maybe this is some arm64 difference?
2019-01-22 21:08:48 -08:00