mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-16 12:29:26 +02:00
Document setTags and hasTag function
This commit is contained in:
parent
9ec4667aaf
commit
a355c493fc
@ -128,12 +128,22 @@ export class SpeciesFormEvolution {
|
|||||||
: EvolutionTag.TRIGGER_USE_ITEM | EvolutionTag.ULTRA_ITEM;
|
: EvolutionTag.TRIGGER_USE_ITEM | EvolutionTag.ULTRA_ITEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
setTags(tags: EvolutionTag): SpeciesFormEvolution {
|
/**
|
||||||
|
* Setter for the {@linkcode EvolutionTag} bitfield for this evolution
|
||||||
|
* @param tags the tags to set, can be combined with bitwise OR |
|
||||||
|
* @returns this {@linkcode SpeciesFormEvolution}
|
||||||
|
*/
|
||||||
|
public setTags(tags: EvolutionTag): this {
|
||||||
this.tags |= tags;
|
this.tags |= tags;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
hasTag(tag: EvolutionTag): boolean {
|
/**
|
||||||
|
* Checks for a certain {@linkcode EvolutionTag} for a {@linkcode SpeciesFormEvolution}.
|
||||||
|
* @param tag the {@linkcode EvolutionTag} to check for. Multiple can be checked at once with the bitwise OR operator |
|
||||||
|
* @returns whether this evolution has the requested tags set
|
||||||
|
*/
|
||||||
|
public hasTag(tag: EvolutionTag): boolean {
|
||||||
return (tag & this.tags) > 0;
|
return (tag & this.tags) > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user