adjust damage color

This commit is contained in:
ckcz123 2020-06-24 15:00:41 +08:00
parent 0676bdd764
commit 06501777b1
3 changed files with 9 additions and 9 deletions

View File

@ -1142,11 +1142,11 @@ control.prototype._updateDamage_extraDamage = function (floorId, ctx, refresh) {
var damage = core.status.checkBlock.damage[x+","+y]||0;
if (damage>0) { // 该点伤害
damage = core.formatBigNumber(damage, true);
core.fillBoldText(ctx, damage, 32*x+16, 32*(y+1)-14, '#FF7F00');
core.fillBoldText(ctx, damage, 32*x+16, 32*(y+1)-14, '#ffaa33');
}
else { // 检查捕捉
if (core.status.checkBlock.ambush[x+","+y]) {
core.fillBoldText(ctx, '!', 32*x+16, 32*(y+1)-14, '#FF7F00');
core.fillBoldText(ctx, '!', 32*x+16, 32*(y+1)-14, '#ffaa33');
}
}
}

View File

@ -159,14 +159,14 @@ enemys.prototype.getDamageString = function (enemy, x, y, floorId) {
if (damage == null) {
damage = "???";
color = '#FF0000';
color = '#FF2222';
}
else {
if (damage <= 0) color = '#00FF00';
if (damage <= 0) color = '#11FF11';
else if (damage < core.status.hero.hp / 3) color = '#FFFFFF';
else if (damage < core.status.hero.hp * 2 / 3) color = '#FFFF00';
else if (damage < core.status.hero.hp) color = '#FF7F00';
else color = '#FF0000';
else if (damage < core.status.hero.hp) color = '#FF9933';
else color = '#FF2222';
damage = core.formatBigNumber(damage, true);
if (core.enemys.hasSpecial(enemy, 19))

View File

@ -2048,11 +2048,11 @@ ui.prototype._drawBook_drawDamage = function (index, enemy, offset, position) {
var damage = enemy.damage, color = '#FFFF00';
if (damage == null) {
damage = '无法战斗';
color = '#FF0000';
color = '#FF2222';
}
else {
if (damage >= core.status.hero.hp) color = '#FF0000';
if (damage <= 0) color = '#00FF00';
if (damage >= core.status.hero.hp) color = '#FF2222';
if (damage <= 0) color = '#11FF11';
damage = core.formatBigNumber(damage);
if (core.enemys.hasSpecial(enemy, 19)) damage += "+";
if (core.enemys.hasSpecial(enemy, 21)) damage += "-";