Plan for improved attack chaining

From OHRRPGCE-Wiki
Jump to navigation Jump to search

Currently, attack chaining is fairly simple. Each attack can chain to one other attack, with a chain rate percent.

Other chaining options[edit]

  • Replace chain rate with "chain condition" which could be one of the following:
    • Chain rate (just like the current value)
    • Chain on tag check (done)
    • Chain on stat check (done)
    • Chain if at least one target is doing specific attack
    • Chain if at least one target is the target of specific attack
    • Chain on battler state bitset (see below)
    • Bitsets:
      • Attacker must know the chained attack too (done)
      • Chained attack checks costs
      • Chained attack consumes costs
  • Add chain-on-fail for when an attack misses
  • Add chain instead (with a chain condition) for replacing an attack with a different attack.

Implementation plan[edit]

  • Clean up battle system to use an AttackData object instead of the atk() buffer (done)
  • Increase the size of attack.bin using binsize.bin (done)
    • Increment RPG version number (in-progress)
  • Add AttackChainData type (done)
  • Convert AttackData to use AttackChainData members (done)
  • Convert loading code in loading.bas (done)
  • Update battle system to use the new data structure (done)
    • Add a check_attack_chain() command to evaluate the various chain condition modes (done)
      • Do simple percentages first (done)
      • Add tag-check, and stat check (done)
  • Add attack chain data to attack editor (done)
    • Do regular chain first (done)
  • Add chain bitsets (done)
  • Add Else-chain support to Editor and Battle system (done)
  • Add instead-chain support to Editor and Battle system (done)
  • Make a chain-browsing tool similar to the existing text-box connection tool. (done)

battler state bitsets[edit]

For both chaining improvements and for the Plan for enemy AI improvements it would be useful to add a concept of battler state bitsets. Each individual enemy and hero in a battle would have their own set of these. They would be similar to tags, and they could be universally named, but each enemy instance and each hero has their own copy of each battler state bitset.

For example, you might name a state bitset "Sword on Fire". The FireSword spell could turn this bit in for the target that it hits. Then, if the that target then uses a "Sword" attack, the attack could detect that the "Sword on Fire" bit was on, and instead-chain to a different "FlameSlash" attack.

Attack Chain Browser[edit]

There should be a tool to browse chains of attacks similar to the tool for browsing chains of text boxes (done)