Skip to content

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Insight affliction tracking

Inisght affliction tracking package.

API

currentAffs()

Returns an array of afflictions on current target.

insight.currentAffs();// ['asthma', 'paralysis', 'clumsiness'];

currentAffDisplay()

Returns an array of afflictions on current target in string format including probability.

insight.currentAffDisplay();// ['asthma: 0.5', 'clumsiness: 0.5', 'paralysis: 1'];

currentAffDisplayHTML()

Returns an HTML friendly display of the current affs, including probability.

insight.currentAffDisplayHTML();// ['asthma: 0.5', 'clumsiness: 0.5', 'paralysis: 1'];

hasAff({id, probability = 0})

Returns a boolean for affliction on target meeting a provided probability from 0 - 1.

//Target afflictions ['asthma: 0.5', 'clumsiness: 0.5', 'paralysis: 1'];insight.hasAff({id: 'asthma'});// trueinsight.hasAff({id: 'asthma',probability: 0.75});//falseinsight.hasAff({id: 'asthma',probability: 0.25});// true

hasAnAff({ids, player, probability = 0})

Returns a boolean for the presence of any aff listed in the array meeting a provided probability from 0 - 1 for the current target.

//Target afflictions ['asthma: 0.5', 'clumsiness: 0.5', 'paralysis: 1'];insight.hasAnAff({ids: ['asthma','clumsiness']});// trueinsight.hasAnAff({ids: ['nausea','slickness']});// falseinsight.hasAnAff({ids: ['asthma','paralysis'],probability: 0.75});// trueinsight.hasAnAff({ids: ['asthma','clumsiness'],probability: 1});// false

hasAffs({ids, player, probability = 0})

Returns a boolean for the presence of all affs listed in the array meeting a provided probability from 0 - 1 for the current target.

//Target afflictions ['asthma: 0.5', 'clumsiness: 0.5', 'paralysis: 1'];insight.hasAffs({ids: ['asthma','clumsiness']});// trueinsight.hasAffs({ids: ['asthma','slickness']});// falseinsight.hasAffs({ids: ['asthma','paralysis'],probability: 1});// falseinsight.hasAffs({ids: ['asthma','clumsiness'],probability: 0.5});// true

hasDef({id, player})

Returns a boolean for the state of a tracked defense on the target.

//Target defense rebounding = true, shield = false;insight.hasDef({id: 'rebounding'});// trueinsight.hasDef({id: 'shield'});// false

getStatus({id, player})

Returns the stored value of any status variable tracked by insight on the current target.

//Target health = 5000, mana = 4500insight.getStatus({id: 'hp'});// 5000

addAff({id, player})

removeAff({id, player})

confirmAff({id, state, player})

Used to confirm if a tracked aff is either 1.0 or no longer present; e.g. A target with tacked asthma smoking.

//Target afflictions ['asthma: 0.5', 'clumsiness: 0.5', 'paralysis: 1'];insight.confirmAff({id: 'asthma',state: true});//Target afflictions ['asthma: 1', 'clumsiness: 0.5', 'paralysis: 1'];insight.confirmAff({id: 'paralysis',state: false});//Target afflictions ['asthma: 1', 'clumsiness: 0.5''];

confirmAffs({ids, state, player})

randomAffs({ids, player})

smartAffs({ids, player, ordered = false})

convertAff({id, to, player})

usedCure({id, player})

//Target afflictions: ['asthma: 1', 'clumsiness: 1'];insight.usedCure({id: "kelp",player: "Khaseem"});//Target afflictions: ['asthma: 0.5', 'clumsiness: 0.5'];

hasDef({id, player})

addDef({id, player})

removeDef({id, player})

setStatus({id, value, player})

getStatus({id, player})

hasBal({id, player})

lostBal({id, player})

balRemaining({id, player})

setTarget(player)

reset()

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors