MCPcopy
hub / github.com/FreezingMoon/AncientBeast / testDirection

Method testDirection

src/ability.ts:1098–1110  ·  view source on GitHub ↗

* Test whether there are valid targets in directions, using direction queries. * * @param {Object} o - Dict of arguments for direction query. * @return true if valid targets in at least one direction, else false

(o: object)

Source from the content-addressed store, hash-verified

1096 * @return true if valid targets in at least one direction, else false
1097 */
1098 testDirection(o: object): boolean {
1099 const directions = this.testDirections(o);
1100
1101 for (let i = 0, len = directions.length; i < len; i++) {
1102 if (directions[i] === 1) {
1103 this.message = '';
1104 return true;
1105 }
1106 }
1107
1108 this.message = this.game.msg.abilities.noTarget;
1109 return false;
1110 }
1111
1112 /**
1113 * Determine if the ability is being used in the opposite direction to the creature's

Callers 12

Nutcase.tsFile · 0.80
Chimera.tsFile · 0.80
Cycloper.tsFile · 0.80
Infernal.tsFile · 0.80
Snow-Bunny.tsFile · 0.80
requireFunction · 0.80
Asher.jsFile · 0.80
Vehemoth.tsFile · 0.80
Horn-Head.tsFile · 0.80
Headless.tsFile · 0.80
Stomper.tsFile · 0.80
Gumble.tsFile · 0.80

Calls 1

testDirectionsMethod · 0.95

Tested by

no test coverage detected