more
This commit is contained in:
parent
37087d08a7
commit
0b9ff1363b
45 changed files with 680 additions and 890 deletions
|
|
@ -67,8 +67,12 @@
|
|||
o.vy += ny * rand(34, 64);
|
||||
this.stress = clamp(this.stress + 1.6, 0, 130);
|
||||
o.stress = clamp(o.stress + 2.8, 0, 130);
|
||||
this.damage(o.outgoingDamage ? o.outgoingDamage(1.2) : 1.2, "\u55a7\u5629");
|
||||
o.damage(this.outgoingDamage ? this.outgoingDamage(1.6) : 1.6, "\u55a7\u5629");
|
||||
const damageToThis = o.outgoingDamage ? o.outgoingDamage(1.2) : 1.2;
|
||||
const damageToOther = this.outgoingDamage ? this.outgoingDamage(1.6) : 1.6;
|
||||
this.damage(damageToThis, "\u55a7\u5629");
|
||||
o.damage(damageToOther, "\u55a7\u5629");
|
||||
this.world.maybeDefeatFromFightDamage?.(this, o, damageToThis);
|
||||
this.world.maybeDefeatFromFightDamage?.(o, this, damageToOther);
|
||||
this.hurtTimer = Math.max(this.hurtTimer, 1.4);
|
||||
o.hurtTimer = Math.max(o.hurtTimer, 1.8);
|
||||
this.adjustRelation(o, -0.16, 0.12, "fight");
|
||||
|
|
@ -80,8 +84,7 @@
|
|||
this.world.spawnFallEffect(o.x, o.y + o.radius * 0.45, 0.55);
|
||||
}
|
||||
if (o.energy + o.mood * 0.25 < this.energy + this.mood * 0.25 - 8) {
|
||||
o.defeatedById = this.id;
|
||||
o.fightWinnerId = this.id;
|
||||
this.world.maybeDefeatFromFightDamage?.(o, this, Math.max(damageToOther, 2.4));
|
||||
}
|
||||
this.world.spawnHeadbuttEffect((this.x + o.x) / 2, (this.y + o.y) / 2 - 5);
|
||||
this.nextHeadbutt = this.world.time + rand(0.34, 0.55);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue