mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Added condition to verify if its already grass or is tera
This commit is contained in:
parent
44bc4b24f4
commit
2fa4ac07ac
@ -3304,11 +3304,8 @@ export class DiscourageFrequentUseAttr extends MoveAttr {
|
||||
export class ForestsCurseAttr extends MoveEffectAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
|
||||
return new Promise(resolve => {
|
||||
console.log("apply", super.apply(user, target, move, args))
|
||||
if (!super.apply(user, target, move, args)) {
|
||||
console.log("teste")
|
||||
if (!super.apply(user, target, move, args) || target.isOfType(Type.GRASS) || target.isTerastallized())
|
||||
return resolve(false);
|
||||
}
|
||||
|
||||
|
||||
let targetTypes = target.getTypes()
|
||||
|
Loading…
Reference in New Issue
Block a user