wordbots / wordbots-core

Client-side code for Wordbots, the card game where YOU make the cards.
http://wordbots.io
MIT License
22 stars 4 forks source link

Incoherent behavior of "that" #1897

Open Zergla opened 6 months ago

Zergla commented 6 months ago

At the start of each of your turn, that object gain 1 health then, this structure gain attack equal to half this structure's attack rounded up. Activate: Deal damage to that object, then set this structure's attack to 1, then choose an object.
Startup: This structure gain 1 attack.

In an attempt to create a structure that allowed one player to hide information from the other player, I uncovered this.

Logically, Activating should deal damage to whatever is already chosen, reset attack, then allow you to choose another object.

The "That object gain 1 health" work that way, it does affect whatever was chosen last time, and is there only to show that.

But activating actually reset "That object" for some reason, meaning the structure only damage itself

tl;dr "That object" reset target upon Activate: but not upon At the start of each turn

Zergla commented 6 months ago

Similar bug: https://app.wordbots.io/card/otclbddnjtn Functional version of that thing I was trying to create

https://app.wordbots.io/card/5yu8xb1ziyr Robot that can't move, but can create a copy of itself then destroy itself

That second robot is interesting, in that any stat change or ability given isn't shared by the copy, making it a functionally a teleporting robot that clear itself from any effect. Yet, if it is chosen by the structure, it will still die after the third turn, no matter how much it teleported.

On the other hand, pointing it at a robot with "Activate: Create a copy of this robot on an empty tile." will cause "that" to reset, and the structure destroy itself. . Worse, this will even happen if the targeted robot is unrelated to the one who copied.

I believe "that" have a problem with robots creating copy of themselves, and that if more than one copy of a robot remain, it will reset because it cannot determine which one is "that", which is weird, because it can easily distinguish between multiple instance of the same robot, even if they are copy of each other, as long they copied before the targeting.

Zergla commented 6 months ago

https://app.wordbots.io/card/lteg12uedwd This robot makes it easy to see that copy aren't the problem, it's just whenever a robot is placed, "that" reset.