Paste #11623: Diff note for paste #11622

Date: 2014/11/27 16:29:09 UTC-08:00
Type: Diff Report

View Raw Paste Download This Paste
Copy Link


 # +----------------------------------
 # |   Attack Damage
 # +----------------------------------
 Fight_Attack:
     type: task
     Script:
 # Check if the player attempted to Dodge
       - if <player.flag[Fight_Dodged]> {
 # Lower chances of a good hit by 20
         - define random <util.random.int[1].to[100]> - 20
         - flag player Fight_Dodged:!
 # Check if the player attempted to Block
         } else if <player.flag[Fight_Blocked]> {
 # Lower chances of a good hit by 20
         - define random <util.random.int[1].to[100]> - 20
         - flag player Fight_Blocked:!
         } else {
 # Check if the player didn't attempt to dodge or block, roll with full range
         - define random <util.random.int[1].to[100]>
         }
       - narrate "rolled %random%"
 # Checking the random number, to determine the amount of damage it will hit for.
-      - if %random% =< 20 {
-        - run Fight_Attack_0
+      - if %random% =< 20 { 
+        - run Fight_Attack_0 
+        }
+
+        else if %random% > 20 && %random% =< 40 { 
+        - run Fight_Attack_1 
+        }
 
-        } else {
-        - if %random% > 20 && %random% =< 40 {
-          - run Fight_Attack_1
+        else if %random% > 40 && %random% =< 60 { 
+        - run Fight_Attack_2 
+        }
 
-          } else {
-          - if %random% > 40 && %random% =< 60 {
-            - run Fight_Attack_2
+        else if %random% > 60 && %random% =< 80 { 
+        - run Fight_Attack_3 
+        }
 
-            } else {
-            - if %random% > 60 && %random% =< 80 {
-              - run Fight_Attack_3
+        else if %random% > 80 && %random% =< 100 { 
+        - run Fight_Attack_4 
+        }
 
-              } else {
-              - if %random% > 80 && %random% =< 100 {
-                - run Fight_Attack_4
+        else { 
+        - narrate "<Dark_Red>RANDOM NUMBER TO DETERMINE ATTACK DAMAGE FAILED!!!!!!!!!!!" 
+        }
-                } else {
-                - narrate "<Dark_Red>RANDOM NUMBER TO DETERMINE ATTACK DAMAGE FAILED!!!!!!!!!!!"
-                }