scripts/opposed-wng.js
/**
   * The opposed button was clicked, evaluate whether it is an attacker or defender, then proceed
   * to evaluate if necessary.
   * 
   * @param {Object} event Click event for opposed button click
   */
The opposed button was clicked, evaluate whether it is an attacker or defender, then proceed
to evaluate if necessary.

@param {Object} event Click event for opposed button click
The opposed button was clicked evaluate whether it is an attacker or defender then proceed to evaluate if necessary . @param { Object } event Click event for opposed button click
static opposedClicked(event)
  {
    let button = $(event.currentTarget),
      messageId = button.parents('.message').attr("data-message-id"),
      message = game.messages.get(messageId);
    let data = message.data.flags.data
    if (this.opposedInProgress)
    {
      if (game.messages.get(this.startMessage._id)) 
        this.defenderClicked(data.postData, message.data.speaker)
      else
      {
        this.clearOpposed()
        this.opposedClicked(event);
      }
    }
    else 
    {
      this.opposedInProgress = true
      this.attackerClicked(data.postData, message.data.speaker)
    }
  }
static opposedClicked ( event ) { let button = $ ( event . currentTarget ) , messageId = button . parents ( '.message' ) . attr ( "data-message-id" ) , message = game . messages . get ( messageId ) ; let data = message . data . flags . data if ( this . opposedInProgress ) { if ( game . messages . get ( this . startMessage . _id ) ) this . defenderClicked ( data . postData , message . data . speaker ) else { this . clearOpposed ( ) this . opposedClicked ( event ) ; } } else { this . opposedInProgress = true this . attackerClicked ( data . postData , message . data . speaker ) } }
The opposed button was clicked, evaluate whether it is an attacker or defender, then proceed
 to evaluate if necessary.
The opposed button was clicked evaluate whether it is an attacker or defender then proceed to evaluate if necessary .
// If opposed already in progress, the click was for the defender // If the startMessage still exists, proceed with the opposed test. Otherwise, start a new opposed test // If no opposed roll in progress, click was for the attacker