Browse Source

[fixed] Fights now working but ending not connecting

KevinSmarts 5 years ago
parent
commit
b53062f3d6
2 changed files with 32 additions and 27 deletions
  1. 29 27
      locations/fight.qsrc
  2. 3 0
      locations/preTG.qsrc

+ 29 - 27
locations/fight.qsrc

@@ -260,6 +260,7 @@ if $ARGS[0] = 'findActiveTimer':
 end
 end
 
 
 if $ARGS[0] = 'main':
 if $ARGS[0] = 'main':
+
 	gs 'fight', 'result_check'
 	gs 'fight', 'result_check'
 	gs 'fight', 'findActiveTimer'
 	gs 'fight', 'findActiveTimer'
 	gt 'fight', $fightTimType, fightTimNum
 	gt 'fight', $fightTimType, fightTimNum
@@ -325,7 +326,7 @@ end
 if $ARGS[0] = 'result_check':
 if $ARGS[0] = 'result_check':
 !!cheat to auto-win fights check
 !!cheat to auto-win fights check
 	if fight_cheat = 1:
 	if fight_cheat = 1:
-		!xgt 'ender', 'win'
+		xgt 'ender', 'win'
 		gt $loc, $metka
 		gt $loc, $metka
 		exit
 		exit
 	end
 	end
@@ -335,19 +336,19 @@ if $ARGS[0] = 'result_check':
 	if pcs_health <= 0:
 	if pcs_health <= 0:
 		'<b><font color = red> You lost!</font></b>'
 		'<b><font color = red> You lost!</font></b>'
 
 
-		!xgt'ender','loss'
+		xgt'ender','loss'
 		gt $loc, $metka
 		gt $loc, $metka
 		exit
 		exit
 	elseif opp_health[0] <= 0:
 	elseif opp_health[0] <= 0:
 		'<b><font color = green><<$boydesc>> You won!</font></b>'
 		'<b><font color = green><<$boydesc>> You won!</font></b>'
 
 
-		!xgt'ender','win'
+		xgt'ender','win'
 		gt $loc, $metka
 		gt $loc, $metka
 		exit
 		exit
 	elseif pcs_willpwr <= 0:
 	elseif pcs_willpwr <= 0:
 		'<b><font color = red> You cannot summon the will to fight!</font></b>'
 		'<b><font color = red> You cannot summon the will to fight!</font></b>'
 
 
-		!xgt'ender','loss'
+		xgt'ender','loss'
 		gt $loc, $metka
 		gt $loc, $metka
 		exit
 		exit
 	end
 	end
@@ -358,20 +359,20 @@ end
 !! Kick
 !! Kick
 $AttackType[0] = 'Kick'
 $AttackType[0] = 'Kick'
 $AttackSkill[0] = 'kick'
 $AttackSkill[0] = 'kick'
-AttackMin[0] = 3
-AttackMax[0] = 4
+AttackMin[0] = 5
+AttackMax[0] = 8
 AttackTime[0] = 40
 AttackTime[0] = 40
 !! Hard Punch
 !! Hard Punch
 $AttackType[1] = 'Hard Punch'
 $AttackType[1] = 'Hard Punch'
 $AttackSkill[1] = 'punch'
 $AttackSkill[1] = 'punch'
-AttackMin[1] = 2
-AttackMax[1] = 3
+AttackMin[1] = 4
+AttackMax[1] = 6
 AttackTime[1] = 30
 AttackTime[1] = 30
 !! Jab
 !! Jab
 $AttackType[2] = 'Jab'
 $AttackType[2] = 'Jab'
 $AttackSkill[2] = 'jab'
 $AttackSkill[2] = 'jab'
-AttackMin[2] = 1
-AttackMax[2] = 2
+AttackMin[2] = 2
+AttackMax[2] = 3
 AttackTime[2] = 15
 AttackTime[2] = 15
 
 
 !!{Attack a target
 !!{Attack a target
@@ -388,22 +389,22 @@ if $ARGS[0] = 'Attack':
 	fightAtk_AttackerNumber = ARGS[4]
 	fightAtk_AttackerNumber = ARGS[4]
 
 
 	if $fightAtk_TargetType = 'opp' and fightAtk_AttackerNumber = 0:
 	if $fightAtk_TargetType = 'opp' and fightAtk_AttackerNumber = 0:
-		$fightAtk['AttackerType'] = 'pcs'
+		$fightAtk_AttackerType = 'pcs'
 		$fightAtk['DefenderName'] = $opp_name[fightAtk_TargetNumber]
 		$fightAtk['DefenderName'] = $opp_name[fightAtk_TargetNumber]
 		$fightAtk['AttackerName'] = 'You'
 		$fightAtk['AttackerName'] = 'You'
 	elseif $fightAtk_TargetType = 'opp':
 	elseif $fightAtk_TargetType = 'opp':
 		$fightAtk['AttackerName'] = $pcs_name[fightAtk_AttackerNumber]
 		$fightAtk['AttackerName'] = $pcs_name[fightAtk_AttackerNumber]
 		$fightAtk['DefenderName'] = $opp_name[fightAtk_TargetNumber]
 		$fightAtk['DefenderName'] = $opp_name[fightAtk_TargetNumber]
-		$fightAtk['AttackerType'] = 'pcs'
+		$fightAtk_AttackerType = 'pcs'
 	else
 	else
-		$fightAtk['AttackerType'] = 'opp'
+		$fightAtk_AttackerType = 'opp'
 		$fightAtk['AttackerName'] = $opp_name[fightAtk_AttackerNumber]
 		$fightAtk['AttackerName'] = $opp_name[fightAtk_AttackerNumber]
 		$fightAtk['DefenderName'] = $pcs_name[fightAtk_TargetNumber]
 		$fightAtk['DefenderName'] = $pcs_name[fightAtk_TargetNumber]
 	end
 	end
 
 
 	fightAtk_Type = arrpos('$AttackType',$fightAtk_Type)
 	fightAtk_Type = arrpos('$AttackType',$fightAtk_Type)
-	fightAtk['AttackerSkillValue'] = dyneval('result = <<$fightAtk_TargetType>>_<<$AttackSkill[fightAtk_Type]>>[<<fightAtk_TargetNumber>>]')
-	fightAtk['TargetReactValue'] = dyneval('result = <<$fightAtk_TargetType>>_react[<<fightAtk_AttackerNumber>>]')
+	fightAtk['AttackerSkillValue'] = dyneval('result = <<$fightAtk_AttackerType>>_<<$AttackSkill[fightAtk_Type]>>[<<fightAtk_AttackerNumber>>]')
+	fightAtk['TargetReactValue'] = dyneval('result = <<$fightAtk_TargetType>>_react[<<fightAtk_TargetNumber>>]')
 	fightAtk['TargetAgilValue'] = dyneval('result = <<$fightAtk_TargetType>>_agil[<<fightAtk_TargetNumber>>]')
 	fightAtk['TargetAgilValue'] = dyneval('result = <<$fightAtk_TargetType>>_agil[<<fightAtk_TargetNumber>>]')
 	fightAtk['MinDamage'] = AttackMin[fightAtk_Type]
 	fightAtk['MinDamage'] = AttackMin[fightAtk_Type]
 	fightAtk['MaxDamage'] = AttackMax[fightAtk_Type]
 	fightAtk['MaxDamage'] = AttackMax[fightAtk_Type]
@@ -416,7 +417,7 @@ if $ARGS[0] = 'Attack':
 	*nl
 	*nl
 	if fightAtk['AttackerSkillValue'] + rand(0,30) > fightAtk['TargetReactValue'] / 4 + 3 * fightAtk['TargetAgilValue'] / 4:
 	if fightAtk['AttackerSkillValue'] + rand(0,30) > fightAtk['TargetReactValue'] / 4 + 3 * fightAtk['TargetAgilValue'] / 4:
 		!!Calculate Damage
 		!!Calculate Damage
-		dynamic "fightAtk['Damage'] = <<$fightAtk['AttackerType']>>_stren[<<fightAtk_AttackerNumber>>] * rand(<<fightAtk['MinDamage']>>,<<fightAtk['MaxDamage']>>) / 15"
+		dynamic "fightAtk['Damage'] = <<$fightAtk_AttackerType>>_stren[<<fightAtk_AttackerNumber>>] * rand(<<fightAtk['MinDamage']>>,<<fightAtk['MaxDamage']>>) / 15"
 		!!Apply Damage
 		!!Apply Damage
 		gs 'fight', 'applyDamage', $fightAtk_TargetType, fightAtk_TargetNumber, fightAtk['Damage']
 		gs 'fight', 'applyDamage', $fightAtk_TargetType, fightAtk_TargetNumber, fightAtk['Damage']
 		if fightAtk['Damage'] > 10:
 		if fightAtk['Damage'] > 10:
@@ -432,10 +433,10 @@ if $ARGS[0] = 'Attack':
 		if $fightAtk_TargetType = 'pcs' and fightAtk_AttackerNumber = 0:
 		if $fightAtk_TargetType = 'pcs' and fightAtk_AttackerNumber = 0:
 			'You avoid the blow.'
 			'You avoid the blow.'
 		else
 		else
-			'<<$fightAtk["AttackerName"]>> avoids the blow.'
+			'<<$fightAtk["DefenderName"]>> avoids the blow.'
 		end
 		end
 	end
 	end
-	dynamic "<<$fightAtk['AttackerType']>>_timer += AttackTime[fightAtk_Type]"
+	dynamic "<<$fightAtk_AttackerType>>_timer += AttackTime[fightAtk_Type]"
 	cla
 	cla
 	act 'Next': gt 'fight', 'main'
 	act 'Next': gt 'fight', 'main'
 
 
@@ -445,6 +446,7 @@ if $ARGS[0] = 'Attack':
 	killvar '$fightAtk_TargetType'
 	killvar '$fightAtk_TargetType'
 	killvar 'fightAtk_TargetNumber'
 	killvar 'fightAtk_TargetNumber'
 	killvar 'fightAtk_AttackerNumber'
 	killvar 'fightAtk_AttackerNumber'
+
 end
 end
 
 
 if $ARGS[0] = 'opponent':
 if $ARGS[0] = 'opponent':
@@ -470,11 +472,11 @@ if $ARGS[0] = 'opponent':
 	end		
 	end		
 !!	if opp_magik[0] > 0: gs 'fight', 'opp_spellcast'
 !!	if opp_magik[0] > 0: gs 'fight', 'opp_spellcast'
 	if rand(0,opp_kick[0]) > 40:
 	if rand(0,opp_kick[0]) > 40:
-		gs 'fight', 'Attack', 'Kick', 'pcs', TargetNumber, ARGS[2]
+		gs 'fight', 'Attack', 'Kick', 'pcs', ARGS[2], TargetNumber
 	elseif rand(0,opp_punch[0]) > 40:
 	elseif rand(0,opp_punch[0]) > 40:
-		gs 'fight', 'Attack', 'Hard Punch', 'pcs', TargetNumber, ARGS[2]
+		gs 'fight', 'Attack', 'Hard Punch', 'pcs', ARGS[2], TargetNumber
 	else
 	else
-		gs 'fight', 'Attack', 'Jab', 'pcs', TargetNumber, ARGS[2]
+		gs 'fight', 'Attack', 'Jab', 'pcs', ARGS[2], TargetNumber
 	end
 	end
 end
 end
 
 
@@ -517,28 +519,28 @@ if $ARGS[0] = 'player':
 	end
 	end
 	if opp_health[1] > 0:
 	if opp_health[1] > 0:
 		act 'Kick <<$opp_name[1]>>':
 		act 'Kick <<$opp_name[1]>>':
-			gs 'fight', 'Attack', 'Kick', 'opp', 1, 0
+			gs 'fight', 'Attack', 'Kick', 'opp', 0, 1
 		end
 		end
 
 
 		act 'Punch <<$opp_name[1]>> hard':
 		act 'Punch <<$opp_name[1]>> hard':
-			gs 'fight', 'Attack', 'Hard Punch', 'opp', 1, 0
+			gs 'fight', 'Attack', 'Hard Punch', 'opp', 0, 1
 		end
 		end
 
 
 		act 'Jab <<$opp_name[1]>>':
 		act 'Jab <<$opp_name[1]>>':
-			gs 'fight', 'Attack', 'Jab', 'opp', 1, 0
+			gs 'fight', 'Attack', 'Jab', 'opp', 0, 1
 		end
 		end
 	end
 	end
 	if opp_health[2] > 0:
 	if opp_health[2] > 0:
 		act 'Kick <<$opp_name[2]>>':
 		act 'Kick <<$opp_name[2]>>':
-			gs 'fight', 'Attack', 'Kick', 'opp', 2, 0
+			gs 'fight', 'Attack', 'Kick', 'opp', 0, 2
 		end
 		end
 
 
 		act 'Punch <<$opp_name[2]>> hard':
 		act 'Punch <<$opp_name[2]>> hard':
-			gs 'fight', 'Attack', 'Hard Punch', 'opp', 2, 0
+			gs 'fight', 'Attack', 'Hard Punch', 'opp', 0, 2
 		end
 		end
 
 
 		act 'Jab <<$opp_name[2]>>':
 		act 'Jab <<$opp_name[2]>>':
-			gs 'fight', 'Attack', 'Jab', 'opp', 2, 0
+			gs 'fight', 'Attack', 'Jab', 'opp', 0, 2
 		end
 		end
 	end	
 	end	
 end
 end

+ 3 - 0
locations/preTG.qsrc

@@ -268,6 +268,9 @@ if $ARGS[0] = 'otelPRE':
 										pcs_intel = 50
 										pcs_intel = 50
 										pcs_sprt = 100
 										pcs_sprt = 100
 										pcs_react = 50
 										pcs_react = 50
+										pcs_kick = 20
+										pcs_punch = 20
+										pcs_jab = 20
 										pcs_health = pcs_vital * 10
 										pcs_health = pcs_vital * 10
 										pcs_willpwr = pcs_intel * 5 + pcs_sprt * 5
 										pcs_willpwr = pcs_intel * 5 + pcs_sprt * 5
 										pcs_mana = (pcs_intel * pcs_magik) + pcs_vital * 5
 										pcs_mana = (pcs_intel * pcs_magik) + pcs_vital * 5