drdplus / tables
Drd+ tables and their units conversion
3.0.0
2021-09-22 07:48 UTC
Requires
- php: >=7.4
- drdplus/base-properties: ^3.0
- drdplus/calculations: ^1.0
- drdplus/codes: ^2.3
- granam/boolean: ^3.2
- granam/dice-rolls: ^6.0
- granam/float: ^5.0
- granam/integer: ^7.1
- granam/number: ^5.1
- granam/strict-object: ^3.1
- granam/string: ^4.1
- granam/tools: ^6.1
Requires (Dev)
- granam/exceptions-hierarchy: ~5.0
- granam/test-with-mockery: ^2.0
- mockery/mockery: ~1.2
- phpunit/phpunit: ~9.3
- rector/rector: ^0.11.53
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2024-10-27 14:09:24 UTC
README
Warning about JumpsAndFallsTable
JumpsAndFallsTable automatically lowers wounds from fall (or jump) by an armour protection, despite rules which DM should decide about portion of reduced damage by himself.
Description
Over sixty tables used for calculation and information in DrD+.
- Table is optional. Measurement is what made it real.
- Bonus, if it has a sense, is expressed by an entity.
- Measurement HAS TO exist (except for base of wounds, which is for numerical transpose only)
- Measurement HAS TO implement MeasurementInterface
- Measurement HAS TO be able to give its current unit
- Measurement MAY be multi-unit
- IF Measurement is multi-unit
- it HAS TO be able to get new self with any of those units
- IF Measurement is multi-unit
- Measurement MAY be based on Bonus
- IF Measurement has Bonus,
- it HAS TO implement MeasurementWithBonusInterface
- and it HAS TO be able to get equivalent Bonus and Bonus has to be able to get equivalent Measurement
- Every Bonus HAS TO have getter (getFoo) for related Measurement
- Every Measurement with Bonus HAS TO have getter (getBar) for related Bonus
- IF Measurement has Bonus,
- Measurement MAY use Table
- Measurement MAY use a Bonus and a Table at once
- IF Measurement has a Bonus and a Table,
- Then that Table HAS to have Measurement converter to Bonus (recommended toBonus)
- and Bonus converter to Measurement (recommended toFoo)
- IF Measurement has a Bonus and a Table,
- Measurement MAY provide conversion helper-methods to value in different unit (but HAS TO provide getter for Measurement in that unit)
- Table SHOULD NOT have conversion methods different that for Measurement to Bonus and vice versa
- Bonus SHOULD NOT have conversion methods different that related Measurement getter
- Measurement type MAY have own Exceptions
- IF Measurement type has own Exceptions, those HAVE TO follow exception hierarchy
Note: Price and Base of wounds are special cases.