1 Commits

Author SHA1 Message Date
Lylian BALL
15e535a1a0
[Ability] Implement Illusion (#3273)
* implement illusion ability with unit test and localizations

* try removing whitespace change on unnecessary files

* nit corrections

* nit update src/field/pokemon.ts

Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>

* nit update src/phases.ts

Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>

* illusion test correction

* unexpected error correction

* refactor property pokemon.illusion to pokemon.battleData.illusion

* nit

* nit

* update unit test up-to-date

* add docs

* merge up to date

* bugfix

* bugfix

* merge up to date

* refactor field illusion out of battleData

* fix nit

* fix nit

* Zoroark change illusion after lastPokemon update

* Zoroark change illusion after lastPokemon update

* refactor bug fix

* bugfix

* bug fix on tests

* Update src/field/pokemon.ts

Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>

* use GetFailedText

* remove useless import

* add condition 'no illusion' into transform move

* wild Zoroark creates an illusion according to the current biome

* wild Zoroark creates an illusion according to the current biome

* delete console.log()

* add doc

* Update src/field/pokemon.ts

Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>

* fix tests

* update locales submodule

* update Illusion interface

* bug fix

* bug fix

* bugfix

* rename some params for future implementations

* Zoroark keep illusion between battles

* Zoroark keep illusion between battles

* delete draft

* merge up-to-date

* bugfix

* merge

* merge

* implement canApplyPresummon method

* Update test/abilities/illusion.test.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update src/data/ability.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update src/data/ability.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update test/abilities/illusion.test.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update test/abilities/illusion.test.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* nit

* review corrections

* nit

* type hints affected by enemy illusion

* type hints affected by enemy illusionin fight-ui-handler

* nit

* rename some parameters back in useIllusion

* Update src/field/pokemon.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update src/field/pokemon.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* refactor battleData.illusion as summonData.illusion and delete oncePerBattleClause

* add comments

* illusion will break before evolution

* Update src/field/pokemon.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update src/data/ability.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update src/data/ability.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update src/data/ability.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update src/data/ability.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* bug fix

* g

* get submodule back

* get submodule back

* bug fix to save illusion status

* add pokemon.getPokeball()

* Update src/field/pokemon.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update src/field/pokemon.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update src/field/pokemon.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update src/data/ability.ts

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Update src/field/pokemon.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update src/field/pokemon.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update src/field/pokemon.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update src/field/pokemon.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

---------

Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-04-12 21:22:04 -04:00