-
Notifications
You must be signed in to change notification settings - Fork 23
developer guide: adding die skills
James Ong edited this page Dec 1, 2018
·
11 revisions
- Add skill abbreviation to BMSkill->skill_name_abbreviation_mapping()
- Create new engine file BMSkill*.php, and create a new class extending BMSkill (or another BMSkill* class)
- Create new test file BMSkill*Test.php
- Fix unit tests for BMBtnSkillRandomBMMixed
- Work out where the skill will be hooked in BMGame. If there is no code there yet to handle die hooks, add it. Add all these hooks to $BMSkill*->hooked_methods
- For each hooked method, implement the desired behaviour, updating the &$args (which are passed by reference) as necessary in BMGame, and add appropriate unit tests to BMSkill*Test. It may be possible to copy this code from other BMSkill*s that share the same behaviour.
- Define the execution order of skill relative to other skills in BMSkill->skill_order_array(), update notes/engine/List_of_die_hooks_and_skills.txt, and add unit tests to BMSkillTest.php if necessary.
- Add the skill description to BMSkill*->get_description() and responderTest.php
- Add descriptions of skill interactions to BMSkill*->get_interaction_descriptions() and responderTest.php
- If the skill affects win determination, then specify this in BMSkill*->prevents_win_determination()
- If there are incompatible attack types, then specify these in BMSkill*->incompatible_attack_types()
- If the skill affects logging, then add appropriate logging logic to BMGame
- If there is complicated logic, add unit tests to BMGameTest
- If there is logic that requires a UI component, or causes information to be stored in the database, add the appropriate logic to BMInterface, and unit tests to BMInterfaceTest
- Test behaviour via vagrant or AMP stack
- Add skill to tools/api-client/python/lib/bmutils.py
- Update list of supported skills on the wiki