Added 'brutish' example trait file - basic demo of a PercentBuff
Removed require of Merc from Traits - not needed
Added Skill class to handle Merc skills - very barebones atm, which made me notice a large degree a shared functionality between ABuff, Traits, Skill & likely more in future.
Notably - tag, name & description, with their members, accessors & initialisation from JSON in the constructor.
JSON is the other thing it seems many classes may share, so moving shared features out would be beneficial.
Added first draft of ScalingStaticBuff class (extends StaticBuff, for now)
This class is designed to handle Buffs that are meant to give benefits that scale against a criteria, which for now is limited to the level of an skill providing the buff.
Potential future criteria could be the level of the Merc, or the number of enemies around the Merc (Brawler skill), etc.
Related might be buffs that gain a bonus from -other- skills, or the Merc having certain Traits, items, etc.
Added an example Skill file to data/skills/ - melee_prowess
The skill showcases/tests an example ScalingStaticBuff
Added a test script for Skill (and by extension ScalingStaticBuff) at test/skill.php
Added a base stats file for Merc to the repo at data/merc_base.stats - though this may end up renamed/moved/reformatted soon
Pointed the part of the Merc constructor that loads base stats at the new file location
Added a couple of example buff data files to test/data/, chiefly for reference and low-level testing
Cleaned some useless comments from Skill.php
Added a static member to Skill to hold an array of loaded skills, much like the system buffs are using
Added add() & get() static methods to Skill.
Skill::add() is used to load skills into the pool/roster/register/whatever
Skill::get() is used to gain access to either a specific Skill (by tag) or the full array
Switched access to the Skill constructor from public to private.
Skills can now only be created through Skill::add()
Updated test/skill.php to pass a tag instead of a path to Skill::add()
Skill is now require'd by Merc
The Merc constructor now loads Skill data, and their associated Buffs, from the JSON file
Added code to Merc that packs Skill information into the Snapshot property
test/merc.php script now require's ScalingStaticBuff, as test case Merc's with Skills will likely need it
Adding placeholder Skill files to data/skills/ - required by the (current) test case Merc
Reworked the __invoke() method of ScalingStaticBuff to use a new stat format - base & increment