Program Lawyer; Var LawyerSkill, LawyerHP, PlayerXP, Price, Lp, Money: Integer; JSkill, Jhp, Jpoints: Integer; Jname: String; hasWon, hasLost: Boolean; whoAttacking: String; GMore: Integer; Const LawyerName = 'Bob'; LawyerLvl = 1; Procedure Attack; var damage, bonus, final: Integer; Begin if (whoAttacking = 'Lawyer') Then Begin damage := (random(LawyerSkill + 10 * 2)) bonus := (random(LawyerSkill + 1 * 2)) damage := (damage + bonus) final := (damage) Writeln('Lawyer attacks Judge for: ' + IntToStr(final) + ' damage.') Jhp := (Jhp - final) Writeln('Judge has ' + Inttostr(Jhp) + ' health left.') End; If (whoAttacking = 'Judge') Then Begin damage := (random(JSkill + 6 * 2)) bonus := (random(JSkill + 2 * 2)) damage := (damage + bonus) final := (damage) Writeln('Judge attacks Lawyer for: ' + Inttostr(final) + ' damage.') LawyerHP := (LawyerHP - final) Writeln('Lawyer has ' + inttostr(LawyerHP) + ' health left.') End; End; Procedure addXP; var value, randomVal: Integer; Begin randomVal := 0; randomVal := (randomVal + random(150)) value := (randomVal * 2 + random(60)) PlayerXP := (playerXP + value) Writeln('Gained XP: ' + inttostr(value) + '.') End; Procedure GetMore; var rInt: Integer; Begin rInt := random(3) If (rInt = 1) Then Begin GMore := random(5); GMore := (GMore * random(5)) End; If (rInt = 2) Then Begin GMore:= random(10); GMore := (GMore * random(5)) End; If (rInt = 3) Then Begin GMore := random(3); GMore := (GMore * random(5)) End; End; Procedure battlePrize; var rVal, rEx: Ineger; Begin rVal := 0; rVal := (rVal + random(25)) GetMore; rEx := (GMore * 2) rVal := (rVal + rEx) Money := (Money + rVal) Writeln('You have gained some money: ' + rVal + '.') Wait(600) Writeln('Current money: ' + Money + '.') End;