evennia.contrib.tutorials.evadventure.tests.test_combat

Test EvAdventure combat.

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

基类:evennia.contrib.tutorials.evadventure.tests.test_combat._CombatTestBase

Test the base functionality of the base combat handler.

setUp()[源代码]

This also tests the get_or_create_combathandler classfunc

test_combathandler_msg()[源代码]

Test sending messages to all in handler

test_get_combat_summary()[源代码]

Test combat summary

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

基类:evennia.contrib.tutorials.evadventure.tests.test_combat._CombatTestBase

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

setUp()[源代码]

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

test_base_action()[源代码]
test_attack__miss(mock_randint)[源代码]
test_attack__success(mock_randint)[源代码]
test_stunt_fail(mock_randint)[源代码]
test_stunt_advantage__success(mock_randint)[源代码]
test_stunt_disadvantage__success(mock_randint)[源代码]
test_use_item()[源代码]

Use up a potion during combat.

test_swap_wielded_weapon_or_spell()[源代码]

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')[源代码]

基类:evennia.contrib.tutorials.evadventure.tests.test_combat._CombatTestBase

Test methods on the turn-based combat handler and actions

maxDiff = None
setUp()[源代码]

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

test_combatanthandler_setup()[源代码]

Testing all is set up correctly in the combathandler

test_remove_combatant()[源代码]

Remove a combatant.

test_stop_combat()[源代码]

Stopping combat, making sure combathandler is deleted.

test_get_sides()[源代码]

Getting the sides of combat

test_queue_and_execute_action()[源代码]

Queue actions and execute

test_execute_full_turn()[源代码]

Run a full (passive) turn

test_action__action_ticks_turn()[源代码]

Test that action execution ticks turns

test_attack__success__kill(mock_randint)[源代码]

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

test_stunt_fail(mock_randint)[源代码]
test_stunt_advantage__success(mock_randint)[源代码]

Test so the advantage matrix is updated correctly

test_stunt_disadvantage__success(mock_randint)[源代码]

Test so the disadvantage matrix is updated correctly

test_flee__success()[源代码]

Test fleeing twice, leading to leaving combat.

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

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

setUp()[源代码]

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

test_get_sides()[源代码]
test_give_advantage()[源代码]
test_give_disadvantage()[源代码]
test_queue_action()[源代码]

Test so the queue action cleans up tickerhandler correctly

test_execute_next_action()[源代码]
test_check_stop_combat()[源代码]

Test combat-stop functionality

test_hold()[源代码]
test_attack()[源代码]

Test attack action in the twitch combathandler

test_stunt()[源代码]
test_useitem()[源代码]
test_wield()[源代码]