mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
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>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/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.")
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "atmos\test_ventcrawl.dm"
|
||||
#include "attack_chain\test_attack_chain_cult_dagger.dm"
|
||||
#include "attack_chain\test_attack_chain_machinery.dm"
|
||||
#include "attack_chain\test_attack_chain_stunbaton.dm"
|
||||
#include "attack_chain\test_attack_chain_turf.dm"
|
||||
#include "attack_chain\test_attack_chain_vehicles.dm"
|
||||
#include "games\test_cards.dm"
|
||||
|
||||
Reference in New Issue
Block a user