/// <reference path="../ContentUnit.ts" />
/// <reference path="../../Things/Person.ts" />
/// <reference path="../../Things/Bodypart/SexHole.ts" />
/// <reference path="../../Things/Bodypart/SexStick.ts" />
class CombatPokeUnit extends ContentUnit {
    private aggressor : ContentDifferential = new ContentDifferential(Person);
    private target : ContentDifferential = new ContentDifferential(Person);
    private markers : ContentDifferential = new ContentDifferential();

    public constructor () {
        super();
    }

    public setAggressor (it : Thing | typeof Thing) {
        this.aggressor = new ContentDifferential(it);
        return this;
    }

    public getAggressor () {
        return this.aggressor;
    }

    public setTarget (it : Thing | typeof Thing) {
        this.target = new ContentDifferential(it);
        return this;
    }

    public getTarget () {
        return this.target;
    }


    public addMarker (...marker : Array<ContentMarker | AdaptiveDifferential>) {
        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) {
        if (cu instanceof CombatPokeUnit) {
            return this.target.isMatch(cu.target) && this.aggressor.isMatch(cu.aggressor) &&
                this.markers.isMatch(cu.markers);
        }
        return false;
    }
}