export class SongOfSplendor extends Power {
constructor(owner) {
super(owner);
this.name = 'Song of Splendor';
this.short = 'SongSplendor';
this.desc = () => `You sing a song of splendor and desire, dealing ${CombatHelper.descPresScaling(25+this.owner.presence()/2)} Mind damage to all enemies when first sung, and empowering the Sexiness of yourself and your companions for the next 5 turns.`;
this.class = GLOBALS.CLASS_CHARMER;
this.type = GLOBALS.POWER_ENCOUNTER;
this.tags = [GLOBALS.POWER_TAG_PERFORMANCE, GLOBALS.POWER_TAG_TEASE, GLOBALS.POWER_TAG_STEALABLE];
this.targeted = false;
this.cooldown = -2;
this.level = 4;
}
doCombat(allyParty, enemyParty, target, showOutput) {
const damageObj = CombatHelper.damageObject(GLOBALS.ATK_MENTAL, GLOBALS.DMG_MIND, 25+this.owner.presence()/2);
const results = enemyParty.map(e => {
const {hit, crit} = window.hitObj = this.attemptTeaseHit(this.owner, e);
const resultDamage = this.applyDamage(this.owner, e, CombatHelper.teaseDamage(this.owner, damageObj, crit));
return {hit, crit, resultDamage};
});
allyParty.filter(c => !c.isDefeated()).forEach(c => c.createCombatEffect(CEFFECTS.SongOfSplendor, 5));
if(!showOutput) return results;
output(textify`
[attacker.CombatName] begin[tps|s] to sing the song of an ancient elven bard, evoking the majesty and splendor of the Jade Queen of Vytania: "And lo the queen beheld her guest, and was overcome with desire, for she was clad all in silver chain and the essence of dragons..." <b>Allies' Sexiness has been improved!</b>`);
results.forEach((result, idx) => {
window.target = enemyParty[idx];
window.hitObj = result;
output(`\n[hitMiss|[target.CombatName] feel[tps|s] the gaze of the queen, and [tps|is|are] flushed by her presence!${CombatHelper.output(result.resultDamage, result.crit)}|[target.CombatName] manage[tps|s] to avoid the queen's gaze.]`);
});
}
}