db0/Dune-CCG-for-OCTGN — Issue #3: Auto-calculate resistances and forces during rites
Author: db0
Created: 2012-02-14 10:18:01+00:00
State: open
Labels: Automation, Fool Proofing, New Features

A possible way to implement this:

When you initiate a rite with a character, a variable is set that a rite is in progress.

The function that does the rite, has a few "phase notifications" and the next one is triggered every time one starts the function again, until it ends. So first time, the rite would engage the persona tagetted and say: "NameofPersona has started a Battle Rite (Landsraad)".

*(A check should be done to see if the player has done another landsraad or CHOAM rite this turn.)*

The next time, it would say "It is now attacker's tactic phase" or something. Then "it is now attacker's engagement phase", where it would be expected that the player engages some resources or other personas.

*(This should be done with the same button and if/else. So if I press the button, and I'm in an engagement phase, and the card is either a resource or persona, it will engage and the game will announce it. This should also do some checks to make sure the card is eligible for the rite. So a personel without the relevant skill shouldn't be able to join the rite for example)

Every card that is engaged for the rite, adds its force and resistance to the relevant tallies of each player (stored globally perhaps?). Should I also allow a card to be disengaged, to allow take-backs? If so, then it should reduce the totals by the amount it added in the first place.

Next phase would be defender tactics and then defender engagement, where the same rules for engagement apply as well with the totals stored in their own global variable.

Next phase would be resolution. The game would simply automatically announce the force totals and possible the cards participating in the rite from each side. I will leave the decision on what to vanguish and subdue to the players though.

*(How would the game know which totals to announce? Theoretically only two players should have any totals in any given rite. Should the function go through each player's global variables and look for non-empty totals for said rite?)

Once resolution is reached, the active rite variable should be reset so that the next rite can begin.