oEtG Forum

Delayed death from healing under SoSac

Turlututu

  • Member
  • **
    • Posts: 91
Fairly easy bug to reproduce. In the replay below, I put myself in negative HP while under shard of sacrifice but still continue playing until AI plays a creature and puts me out of my misery.

Note: this only happens when healing. The loss of life from playing the shard itself is still immediately lethal.

I'm guessing the dead/alive check only happens when damage is inflicted?

{"date":1712390102840,"seed":1801651308,"players":[{"idx":1,"name":"Turlututu","user":"Turlututu","deck":"064vj0653e067js067k3067qb018pk"},{"idx":2,"ai":1,"name":"Celeste","deck":"064sa014sh064vj01507014vg014vo0152i015300152t0156a0156j0155q0156b0158t015920159g015cd015bu015cv025f9015f6025fp015iv015il015lp015m1015ot015p2025s5015sc015vj015vl0162d0162701621018pi","hp":100,"drawpower":1,"markpower":1}],"moves":[{"x":"accept"},{"x":"accept","c":0,"t":0},{"x":"cast","c":18,"t":1},{"x":"cast","c":6},{"x":"cast","c":3},{"x":"cast","c":13},{"x":"end"},{"x":"cast","c":38,"t":0},{"x":"cast","c":37,"t":0},{"x":"end","c":0,"t":0},{"x":"end"},{"x":"cast","c":39,"t":0},{"x":"end","c":0,"t":0},{"x":"cast","c":8},{"x":"cast","c":10},{"x":"cast","c":21},{"x":"cast","c":24},{"x":"end"},{"x":"cast","c":62,"t":39},{"x":"end","c":0,"t":0},{"x":"end"},{"x":"end","c":0,"t":0},{"x":"cast","c":7},{"x":"cast","c":31},{"x":"cast","c":29},{"x":"cast","c":27},{"x":"cast","c":32},{"x":"cast","c":28},{"x":"end"},{"x":"cast","c":79,"t":0},{"x":"cast","c":71,"t":0},{"x":"end","c":0,"t":0}]}


serprex

  • Global Moderator
  • *****
    • Posts: 1485
https://github.com/serprex/openEtG/commit/53e9a9bec00594e3c5f276e327f19f02544c9c63

Should really add some unit tests to this damage logic, whenever I touch it subtle bugs happen for the next year