evennia.contrib.tutorials.evadventure.tests.test_combat

Test EvAdventure combat.

class evennia.contrib.tutorials.evadventure.tests.test_combat.TestEvAdventureCombatBaseHandler(methodName='runTest')[source]

Bases: evennia.contrib.tutorials.evadventure.tests.test_combat._CombatTestBase

Test the base functionality of the base combat handler.

setUp()[source]

This also tests the get_or_create_combathandler classfunc

test_combathandler_msg()[source]

Test sending messages to all in handler

test_get_combat_summary()[source]

Test combat summary

class evennia.contrib.tutorials.evadventure.tests.test_combat.TestCombatActionsBase(methodName='runTest')[source]

Bases: evennia.contrib.tutorials.evadventure.tests.test_combat._CombatTestBase

A class for testing all subclasses of CombatAction in combat_base.py

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_base_action()[source]
test_attack__miss(mock_randint)[source]
test_attack__success(mock_randint)[source]
test_stunt_fail(mock_randint)[source]
test_stunt_advantage__success(mock_randint)[source]
test_stunt_disadvantage__success(mock_randint)[source]
test_use_item()[source]

Use up a potion during combat.

test_swap_wielded_weapon_or_spell()[source]

First draw a weapon (from empty fists), then swap that out to another weapon, then swap to a spell rune.

class evennia.contrib.tutorials.evadventure.tests.test_combat.EvAdventureTurnbasedCombatHandlerTest(methodName='runTest')[source]

Bases: evennia.contrib.tutorials.evadventure.tests.test_combat._CombatTestBase

Test methods on the turn-based combat handler and actions

maxDiff = None
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_combatanthandler_setup()[source]

Testing all is set up correctly in the combathandler

test_remove_combatant()[source]

Remove a combatant.

test_stop_combat()[source]

Stopping combat, making sure combathandler is deleted.

test_get_sides()[source]

Getting the sides of combat

test_queue_and_execute_action()[source]

Queue actions and execute

test_execute_full_turn()[source]

Run a full (passive) turn

test_action__action_ticks_turn()[source]

Test that action execution ticks turns

test_attack__success__kill(mock_randint)[source]

Test that the combathandler is deleted once there are no more enemies

test_stunt_fail(mock_randint)[source]
test_stunt_advantage__success(mock_randint)[source]

Test so the advantage matrix is updated correctly

test_stunt_disadvantage__success(mock_randint)[source]

Test so the disadvantage matrix is updated correctly

test_flee__success()[source]

Test fleeing twice, leading to leaving combat.

class evennia.contrib.tutorials.evadventure.tests.test_combat.TestEvAdventureTwitchCombatHandler(methodName='runTest')[source]

Bases: evennia.utils.test_resources.EvenniaCommandTestMixin, evennia.contrib.tutorials.evadventure.tests.test_combat._CombatTestBase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_get_sides()[source]
test_give_advantage()[source]
test_give_disadvantage()[source]
test_queue_action()[source]

Test so the queue action cleans up tickerhandler correctly

test_execute_next_action()[source]
test_check_stop_combat()[source]

Test combat-stop functionality

test_hold()[source]
test_attack()[source]

Test attack action in the twitch combathandler

test_stunt()[source]
test_useitem()[source]
test_wield()[source]