Browse Source

[added] autocombat cheat for non-magical fights to boxing, cheatmenu_din and fight

julzor 5 years ago
parent
commit
6f77ed8ce5
3 changed files with 37 additions and 9 deletions
  1. 17 0
      locations/Cheatmenu_din.qsrc
  2. 5 1
      locations/boxing.qsrc
  3. 15 8
      locations/fight.qsrc

+ 17 - 0
locations/Cheatmenu_din.qsrc

@@ -150,6 +150,17 @@ $cheatmenu['fight'] = {
 	end
 }
 
+$cheatmenu['autocombat'] = {
+	if autocombat_cheat = 0:
+		autocombat_cheat = 1
+		dynamic $cheatmenu['permanent']
+		exit
+	elseif autocombat_cheat = 1:
+		autocombat_cheat = 0
+		dynamic $cheatmenu['permanent']
+	end
+}
+
 $cheatmenu['age'] = {
 	:tooyoung
 	age = year - ((pcs_dob - (pcs_dob mod 10000)) / 10000)
@@ -350,6 +361,8 @@ $cheatmenu['permanent'] = {
 	if cheatBandit = 1:$cheatBandit = 'Currently ON'
 	if fight_cheat = 0:$fight_cheat = 'Currently OFF'
 	if fight_cheat = 1:$fight_cheat = 'Currently ON'
+	if autocombat_cheat = 0:$autocombat_cheat = 'Currently OFF'
+	if autocombat_cheat = 1:$autocombat_cheat = 'Currently ON'
 	if cheat_NoPregnancy = 0:$cheat_NoPregnancy = 'Currently OFF'
 	if cheat_NoPregnancy = 1:$cheat_NoPregnancy = 'Currently ON'
 	if cheatBimbo = 0:$cheatBimbo = 'Currently OFF'
@@ -384,7 +397,11 @@ $cheatmenu['permanent'] = {
 	
 	'Enable sleeping with vibrator inserted: <a href="exec:dynamic $cheatmenu[''Vibrator'']"><<$cheatVib>></a>'
 	'Bandit always horny: <a href="exec:dynamic $cheatmenu[''Bandit'']"><<$cheatBandit>></a>'
+	
+	*nl
+	
 	'Automatically win every fight: <a href="exec:dynamic $cheatmenu[''fight'']"><<$fight_cheat>></a>'
+	'Automatically resolve non-magical fights: <a href="exec:dynamic $cheatmenu[''autocombat'']"><<$autocombat_cheat>></a>'
 	
 	*nl
 	

+ 5 - 1
locations/boxing.qsrc

@@ -1,11 +1,15 @@
 # boxing
 !Choosing a physical attack
-if weapon = 0:
+if weapon = 0 and autocombat_cheat = 0:
 	act 'Fist':
 		cla
 		!gs'atak'
 		xgt'atak','player'
 	end
+elseif weapon = 0 and autocombat_cheat = 1:
+	cla
+	!gs'atak'
+	xgt'atak','player'
 end
 
 if weapon > 0:

+ 15 - 8
locations/fight.qsrc

@@ -291,16 +291,22 @@ if $ARGS[0] = 'start':
 				end
 			end
 		end
-
-		act 'Physical Attack':xgt'boxing'
-		if pcs_magik > 0:
-			act 'Magical Attack':gt'magik'
-		end
+		if autocombat_cheat = 0 or pcs_magick > 0:
+			act 'Physical Attack':xgt'boxing'
+			if pcs_magik > 0: act 'Magical Attack':gt'magik'
+			act 'Surrender': gt 'ender', 'loss'
+		elseif autocombat_cheat = 1 and pcs_magick = 0:
+			xgt'boxing'
+		end		
 	elseif hod = 1:
 		!enemy attacks
 		'<font color = red><<$boydesc>> attacks</font>'
-
-		act 'Further':xgt'enemy','start'
+		if autocombat_cheat = 0: 
+			act 'Continue': xgt'enemy','start'
+			act 'Surrender': gt 'ender', 'loss'
+		elseif autocombat_cheat = 1: 
+			xgt'enemy','start'
+		end
 	end
 end
 
@@ -333,7 +339,8 @@ if $ARGS[0] = 'sta':
 	if defenceActM > 0:'<b><font color = green><<defenceActM>> Mana recovery protection</font></b>'
 	'<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>'
 
-	act 'Further':gt'fight','start'
+	if autocombat_cheat = 0: act 'Continue':gt'fight','start'
+	if autocombat_cheat = 1: gt'fight','start'
 end
 
 if $ARGS[0] = 'Wrestlergen':