ソースを参照

[fixed] Ironed out some fight bugs but its still not right

KevinSmarts 5 年 前
コミット
b48d4fb1b1
1 ファイル変更26 行追加27 行削除
  1. 26 27
      locations/fight.qsrc

+ 26 - 27
locations/fight.qsrc

@@ -171,23 +171,23 @@ if $ARGS[0] = 'start':
 
 	$HTMLText = '<table>
 		<tr>
-			<th align="right">Allies</td>
-			<th align="center" valign="center" rowspan=<<tableSize*2+1>> >vs.</td>
-			<th align="left">Opponents</td>
+			<th align="left">Allies</left></td>
+			<th align="center" valign="center" rowspan=<<tableSize*2+1>> >vs.</center></td>
+			<th align="right">Opponents</right></td>
 		</tr>'
 	i = 0
 	:FightPoster
 	if i < tableSize:
 		$HTMLText += '
 		<tr>
-			<td align="right"><img HEIGHT=400 src="<<$pcs_image[i]>>"></td>
+			<td align="left"><img HEIGHT=400 src="<<$pcs_image[i]>>"></left></td>
 
-			<td align="left"><img HEIGHT=400 src="<<$opp_image[i]>>"></td>
+			<td align="right"><img HEIGHT=400 src="<<$opp_image[i]>>"></right></td>
 		</tr>
 		<tr>
-			<td align="right"><<$pcs_name[i]>></td>
+			<td align="left"><<$pcs_name[i]>></left></td>
 
-			<td align="left"><<$opp_name[i]>></td>
+			<td align="right"><<$opp_name[i]>></right></td>
 		</tr>'
 		i += 1
 		jump 'FightPoster'
@@ -389,17 +389,16 @@ if $ARGS[0] = 'Attack':
 
 	if $fightAtk_TargetType = 'opp' and fightAtk_AttackerNumber = 0:
 		$fightAtk['AttackerType'] = 'pcs'
+		$fightAtk['DefenderName'] = $opp_name[fightAtk_TargetNumber]
 		$fightAtk['AttackerName'] = 'You'
 	elseif $fightAtk_TargetType = 'opp':
+		$fightAtk['AttackerName'] = $pcs_name[fightAtk_AttackerNumber]
+		$fightAtk['DefenderName'] = $opp_name[fightAtk_TargetNumber]
 		$fightAtk['AttackerType'] = 'pcs'
-		$fightAtk['AttackerName'] = $pcs_name['<<ARGS[3]>>']
-		$fightAtk['DefenderName'] = $opp_name['<<ARGS[2]>>']
-		$fightAtk['TargetPronoun'] = 'They'
 	else
 		$fightAtk['AttackerType'] = 'opp'
-		$fightAtk['AttackerName'] = $opp_name['<<ARGS[3]>>']
-		$fightAtk['DefenderName'] = $pcs_name['<<ARGS[2]>>']
-		$fightAtk['TargetPronoun'] = 'You'
+		$fightAtk['AttackerName'] = $opp_name[fightAtk_AttackerNumber]
+		$fightAtk['DefenderName'] = $pcs_name[fightAtk_TargetNumber]
 	end
 
 	fightAtk_Type = arrpos('$AttackType',$fightAtk_Type)
@@ -410,9 +409,9 @@ if $ARGS[0] = 'Attack':
 	fightAtk['MaxDamage'] = AttackMax[fightAtk_Type]
 
 	if $fightAtk_TargetType = 'opp' and fightAtk_AttackerNumber = 0:
-		'You attempt to <<$fightAtk["Type"]>> <<$fightAtk["DefenderName"]>>!'
+		'You attempt to <<$fightAtk_Type>> <<$fightAtk["DefenderName"]>>!'
 	else
-		'<<$fightAtk["AttackerName"]>> attempts to <<$fightAtk["Type"]>> <<$fightAtk["DefenderName"]>>!'
+		'<<$fightAtk["AttackerName"]>> attempts to <<$fightAtk_Type>> <<$fightAtk["DefenderName"]>>!'
 	end
 	*nl
 	if fightAtk['AttackerSkillValue'] + rand(0,30) > fightAtk['TargetReactValue'] / 4 + 3 * fightAtk['TargetAgilValue'] / 4:
@@ -422,15 +421,15 @@ if $ARGS[0] = 'Attack':
 		gs 'fight', 'applyDamage', $fightAtk_TargetType, fightAtk_TargetNumber, fightAtk['Damage']
 		if fightAtk['Damage'] > 10:
 			if $fightAtk_TargetType = 'opp' and fightAtk_AttackerNumber = 0:
-				'The hit is hard and you reel in pain.'
+				'The hit is hard and <<$fightAtk["DefenderName"]>> reels in pain.'
 			else
-				'The hit is hard and <<$fightAtk["AttackerName"]>> reels in pain.'
+				'The hit is hard and you reel in pain.'
 			end
 		else
 			'Its a glancing blow, but still hurts.'
 		end
 	else
-		if $fightAtk_TargetType = 'opp' and fightAtk_AttackerNumber = 0:
+		if $fightAtk_TargetType = 'pcs' and fightAtk_AttackerNumber = 0:
 			'You avoid the blow.'
 		else
 			'<<$fightAtk["AttackerName"]>> avoids the blow.'
@@ -505,41 +504,41 @@ if $ARGS[0] = 'player':
 	end
 	if opp_health[0] > 0:
 		act 'Kick <<$opp_name[0]>>':
-			gs 'fight', 'Attack', 'Kick', 'opp', 0, ARGS[2]
+			gs 'fight', 'Attack', 'Kick', 'opp', 0, 0
 		end
 
 		act 'Punch <<$opp_name[0]>> hard':
-			gs 'fight', 'Attack', 'Hard Punch', 'opp', 0, ARGS[2]
+			gs 'fight', 'Attack', 'Hard Punch', 'opp', 0, 0
 		end
 
 		act 'Jab <<$opp_name[0]>>':
-			gs 'fight', 'Attack', 'Jab', 'opp', 0, ARGS[2]
+			gs 'fight', 'Attack', 'Jab', 'opp', 0, 0
 		end
 	end
 	if opp_health[1] > 0:
 		act 'Kick <<$opp_name[1]>>':
-			gs 'fight', 'Attack', 'Kick', 'opp', 1, ARGS[2]
+			gs 'fight', 'Attack', 'Kick', 'opp', 1, 0
 		end
 
 		act 'Punch <<$opp_name[1]>> hard':
-			gs 'fight', 'Attack', 'Hard Punch', 'opp', 1, ARGS[2]
+			gs 'fight', 'Attack', 'Hard Punch', 'opp', 1, 0
 		end
 
 		act 'Jab <<$opp_name[1]>>':
-			gs 'fight', 'Attack', 'Jab', 'opp', 1, ARGS[2]
+			gs 'fight', 'Attack', 'Jab', 'opp', 1, 0
 		end
 	end
 	if opp_health[2] > 0:
 		act 'Kick <<$opp_name[2]>>':
-			gs 'fight', 'Attack', 'Kick', 'opp', 2, ARGS[2]
+			gs 'fight', 'Attack', 'Kick', 'opp', 2, 0
 		end
 
 		act 'Punch <<$opp_name[2]>> hard':
-			gs 'fight', 'Attack', 'Hard Punch', 'opp', 2, ARGS[2]
+			gs 'fight', 'Attack', 'Hard Punch', 'opp', 2, 0
 		end
 
 		act 'Jab <<$opp_name[2]>>':
-			gs 'fight', 'Attack', 'Jab', 'opp', 2, ARGS[2]
+			gs 'fight', 'Attack', 'Jab', 'opp', 2, 0
 		end
 	end	
 end