crnormand / gurps

Implementing a GURPS 4e game aid for Foundry VTT
MIT License
105 stars 49 forks source link

[Feature Request] Custom Critical Success or Failure rules. #993

Open Farmeroz opened 3 years ago

Farmeroz commented 3 years ago

Is it possible to call Roll Tables from OtF results such as critical hits/failures/etc.? (and to define the critical hit ranges in case of using 20+ skill levels increase crits, for example)? Much in the way that a Fright Check can call a Roll Table called Fright Check (I entered that all in last night and works a treat).

Ultimately, I'd like to have an OtF to check weapon skill, roll damage in case of a hit, and report a Critical Success or Failure as well (and same with spell casting crit failures) by calling the tables as part of the OtF and maybe that's already possible?

crnormand commented 2 years ago

We can't do it with OtFs alone, but you can create a script macro:

GURPS.executeOTF('A:Rapier')
if (GURPS.lastTargetedRoll.isCritSuccess) {
  let tname = 'Critical Hit'
  let tables = game.tables.contents.filter(t => t.name.match(tname))
  if (tables.length == 1) {
    let table = tables[0]
    let r = await table.roll()
    table.draw(r)
  }
}

I am not certain how to can modify the roll, however.

Farmeroz commented 2 years ago

Thanks, Chris - this is great. Is there a way to change the Critical threshold (to allow Crits on a 7 with effective skill 20+, 8 on 25+, etc. following any house rules)?

crnormand commented 2 years ago

At the moment, no. But if you open an issue, we might be able to create some thing in the future. For people who play with those kind of home rules.

crnormand commented 2 years ago

Actually, I guess we could leave this issue open, and just rename it.

Farmeroz commented 2 years ago

Sounds good - thanks :-)