Individual Combat Information


Written By

Kevin Streander and David Price


Updated 10-25-02

 


CombatPopup Display

CombatPopup Display Use Case

Combat Psuedo Code

Methods used




Top



Combat Interface UseCase
Normal Individual Combat Initiated By:
The Dark Forces have previously successfully spotted Fellowship characters find
themselves in the same hex.
Terminates: After the players agree to stop or all characters on one side are
eliminated in one way or another
Sequence:
1. The CombatPopup dialog screen appears
2. If one player wishes to enter individual combat, by selecting a character and pressing
the the Continue button, combat must occur.
3. The combat differential is calculated. (morale+combat-wounds).
4. One round of combat is completed.
5. The users are queried as to whether they wish for combat to continue
6. The combat differential is recalculated.
7. Combat continues in this manner until both players wish to stop or one player's characters are
killed off.
 
Alternatives:
1. Sorcery is used by pressing the Use Sorcery button; Sorcery tables take the place of
Combat differntial for the character.
2. Nazgul flee from combat by using the Retreat button.
3. The Use Ring button is used allow the ring bearer to escape combat.
4. Multiple characters are present in the hex; the users select which they want to fight with.
5. Multiple characters are present in the hex; if a Character is killed, but the player has another
Character(s) in the hex, the combat must continue unless both of them want to quit.
 

Top




Combat Psuedo Code
Sieze the Ring - differs in that champion is auto-selected, only one set of champions is used, no mutually selectable retreat, combat continues until one champion is dead or the ring is donned.
Servant of Sauron combat- DPP can not select a champion. No mutual retreat.

1. Check gamestate to see if the movement phase has concluded
if(check_gamephase() == movement phase over)
  then
  go to 2.
else no combat

2. Check flags to see if characters of opposing forces are present in the same hex and if they are spotted using the functions check_spotted() and check_location()

Combat procedure

index := 0
  while( index <= PlayerDPP.(Character global variable list size) )
    if unit.location == currentHex
    unit_list_DPP[index2] := unit
  index++

  index := 0
  while( index <= PlayerFellow.(Character global variable list size) )
if the fellowship player is the one initiating combat, we skip the check.spotted(), probably use a case
    case 1:
      if unit.location == currentHex && unit_fellowship.check_spotted() == 1
      unit_list_Fellow[index] := unit
    case 2:
      if unit.location == currentHex
      unit_list_Fellow[index] := unit
    index++

   if unit_list_DPP or unit_list_Fellowship are empty
    move on to the next game phase(end combat phase)
 
3. Call CombatPopup gui
call_combatpopup()
 
4. CombatPopup recieves and displays the list of characters present in the hex
 
init combatpopup()
    show( unit_list_DPP ) textbox2

    show( unit_list_fellow ) textbox1
 
5. Mouse click on one of the characters present in the character list causes the characters attributes to be loaded into the corresponding
selected_char_attribs text box, including the Combat differential
 
method handle_textbox1()
  lrelease textline# load up attributes and combat differential
    selected_char_attribsFellow := show_attributes(character)
    combat_fellow := character.determine_combat_value()
  if combat_dpp != &null
  combat_diff_fellow := combat_fellow - combat_dpp
  display combat_diff_fellow line 2 Combat_diff textbox
  combat_diff_dpp := inverse of combat_diff_fellow
  display combat_diff_dpp line 3 Combat_diff textbox
     else combat differential can not be calculated
 

method handle_textbox2()
  lrelease textline# load up attributes and combat differential
    selected_char_attribsDPP := show_attributes(character)
  combat_dpp := character.combat_value()
  if combat_fellow != &null
  combat_diff_dpp := combat_dpp - combat_fellow
  display combat_diff_dpp line 3 Combat_diff textbox
  combat_diff_fellow := inverse of combat_diff_dpp
  display combat_diff_fellow line 2 Combat_diff textbox
     else combat differential can not be calculated yet

6. Mouse click on a different character causes that characters attributes to replace the first characters attributes
 
  lrelease textline#
  delete attributes selected_char_attribsFellow

  lrelease textline#
  delete attributes selected_char_attribsDPP

7. Clicking the Use Sorcery button will cause sorcery table attributes to replace the normal combat attributes for that character
 
method handle_sorcery()
sorcery tables are consulted for the player or, if both select to use sorcery, both players
   else combat differential can not be calculated
   the wounds are returned in a list, 1 for fellowship, 2 for DPP, the wounds are then
   else combat differential can not be calculated
applied normally, except in the case of naz`gul, who take "real" damage from sorcery
 
 

 
8. Clicking Use Ring will cause the Ring Bearer to don the ring, ring on flag is set,
Combat is terminated if Naz`gul are not present.
This may be done at any time that combat is not actively occuring
 
method handle_ring()
  ringIsOn := character.use_ring()
  if ringIsOn == 1
    retreat()
 
9. Clicking the Retreat button will allow a Naz`gul champion to escape from combat, both
players clicking retreat will end combat
method retreat()
  on lrelease FellowshipPlayer
    FellowRetreat := 1;
 
  on lrelease DPPlayer
    DPPlayer := 1;
 
  if clicked_unit == naz`gul && combat round == 0
     move on to the next game phase
 
  if ringIsOn == 1 && unit_list does not have naz`gul
    move on to the next game phase
 
  if DPP_retreat == 1 && FellowRetreat == 1
    move on to the next game phase
 
10. Clicking Continue will indicate that the player is ready to commence into Combat.
Combat will begin when both players have clicked Continue
method handle_continue()
 
  on lrelease DPPlayer
    DPP_ready := 1;
 
  on lrelease FellowshipPlayer
    FellowPlayer_ready :=1;
 
  if DPP_ready == 1 && FellowPlayer_ready == 1 start combat()
 
11. A random number between 1 and 6 is generated to retrieve a key for each character.
The key is sent to the function combat value is updated
 
combat calculation
  WoundsKey = 1?6
  WoundsRnd1[a,b] = calculate_wounds(WoundsKey, combat_differential, dppSorc, fellowSorc)
  WoundsKey = 1?6
  WoundsRnd2[x,y] = calculate_wounds(WoundsKey, combat_differential)
  WoundsFellowship = WoundsRnd1[1] + WoundsRnd2[2];
  WoundsDPP = WoundsRnd1[2] + WoundsRnd2[1];
 
12. The wounds are returned from the list to the selected_Char_attribs and to the function
update_wounds(). wounds from elven swords will have to be handled differently
 
characterFellowship.update_wounds(WoundsFellowship)
  FellowshipEndurance -= WoundsFellowship
return FellowshipEndurance

characterdpp.update wounds(WoundsDPP)
  DPPEndurance -= WoundsDPP
return DPPEndurance
 
  if(FellowEndurance =< 0)
    character.kill_character()
unit.removeUnit()
 
  if(DPPEndurance =< 0)
    character.kill_character()
if character.name != naz`gul* or character.endurance == 0
unit.removeUnit()
 

13. The process returns to step 11 or if a champion is killed the character is removed from the
game, if it is not a Naz`gul. If both players have additiontal characters present in the hex,
the process returns to step 5.
 
14. if combat is ended and a new ring bearer needs to be selected call choose_ringbearer()
 
choose_ringbearer()
  check_presence(Fellowship, hex)
  if Fellowship == 1
    select_RingBearer()
 
  else if check_presence(Gollum, hex) == 1
    give Gollum the ring
 
  else if check_presence(DPP, hex) == 1
    select_RingBearer()
 
  else
    drop_ring()
 

Top