///
///
///
/**
* Quick Cheat Sheet of markers!
*/
class CombatPokeDescription extends ContentDescription {
public static DESCRIPTIONS = [];
public constructor (name : string) {
super(name, new ContentGroup());
CombatPokeDescription.DESCRIPTIONS.push(this);
}
public setDescriptionFunction (descriptionFor : (target : any, markers : Array) => Say) {
let finalFunction = (description : CombatPokeDescription, group : ContentGroup) => {
// Combat only has one unit
let unit = group.getUnit(0);
return descriptionFor (unit.getTarget().nouns[0], unit.getMarkers());
}
this.description = finalFunction;
return this;
}
public addUnit () {
let unit = new CombatPokeUnit();
( this.group).addUnit(unit);
return unit;
}
public static getDescription (target : ContentGroup) {
return ContentDescription.pickDescriptions(CombatPokeDescription.DESCRIPTIONS, target);
}
}