Files
Paradise/code/tests/attack_chain/test_attack_chain_stunbaton.dm
CRUNCH d05cc7c5cb Migrates /obj/item/melee/baton to the new Attack Chain, Adds Universal Poking (#28241)
* Update stunbaton.dm

* Update stunbaton.dm

* update

* Update stunbaton.dm

* Update code/game/objects/items/weapons/stunbaton.dm

Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* update based on review

* Create test_attack_chain_stunbaton.dm

* update

---------

Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>
Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
2025-02-18 11:11:13 +00:00

26 lines
1.2 KiB
Plaintext

/datum/game_test/attack_chain_stunbaton/Run()
var/datum/test_puppeteer/player = new(src)
var/datum/test_puppeteer/target = player.spawn_puppet_nearby()
player.spawn_obj_in_hand(/obj/item/melee/baton/loaded)
// Prod with inactive baton.
player.set_intent("help")
player.click_on(target)
TEST_ASSERT_EQUAL(FALSE, target.puppet.getStaminaLoss(), "Inactive baton delt stamina damage.")
TEST_ASSERT_EQUAL(target.puppet.health, target.puppet.getMaxHealth(), "Inactive help intent baton did damage.")
// Prod with active baton.
player.use_item_in_hand()
player.click_on(target)
TEST_ASSERT_NOTEQUAL(FALSE, target.puppet.getStaminaLoss(), "Active help baton did not deal stamina damage.")
TEST_ASSERT_EQUAL(target.puppet.health, target.puppet.getMaxHealth(), "Active help intent baton did damage.")
target.rejuvenate()
sleep(4 SECONDS) // Baton cooldown + anti baton timer.
// Police brutality with active baton.
player.set_intent("harm")
player.click_on(target)
TEST_ASSERT_NOTEQUAL(FALSE, target.puppet.getStaminaLoss(), "Active harm baton did not deal stamina damage.")
TEST_ASSERT_NOTEQUAL(target.puppet.health, target.puppet.getMaxHealth(), "harm baton did no damage.")