/// /// /// /// class CombatPokeUnit extends ContentUnit { private target : ContentDifferential = new ContentDifferential(Person); private markers : ContentDifferential = new ContentDifferential(); public constructor () { super(); } public setTarget (it : Thing | typeof Thing) { this.target = new ContentDifferential(it); return this; } public getTarget () { return this.target; } public addMarker (...marker : Array) { this.markers.addNoun(...marker); return this; } public getMarkers () { return [...this.markers.nouns]; } public getScore () { return this.target.getScore() + this.markers.getScore(); } public isMatch (cu : CombatPokeUnit) { console.warn("Chegking :)"); if (cu instanceof CombatPokeUnit) { console.log(this.markers.nouns, cu.markers.nouns); return this.target.isMatch(cu.target) && this.markers.isMatch(cu.markers); } return false; } }