Fix Roost and Stellar Terastallization interaction (#10021)

* Fix Roost and Stellar Terastallization interaction

* Fixed to when not full HP

* Make the code more readable

* Fix
This commit is contained in:
André Bastos Dias 2023-12-27 20:42:40 +00:00 committed by GitHub
parent 4e57a4d550
commit c1dbf4002d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15984,11 +15984,13 @@ export const Moves: {[moveid: string]: MoveData} = {
duration: 1,
onResidualOrder: 25,
onStart(target) {
if (!target.terastallized) {
this.add('-singleturn', target, 'move: Roost');
} else if (target.terastallized === "Flying") {
this.add('-hint', "If a Flying Terastallized Pokemon uses Roost, it remains Flying-type.");
if (target.terastallized) {
if (target.hasType('Flying')) {
this.add('-hint', "If a Terastallized Pokemon uses Roost, it remains Flying-type.");
}
return false;
}
this.add('-singleturn', target, 'move: Roost');
},
onTypePriority: -1,
onType(types, pokemon) {