• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Making Progress, Still Need Help

Status
Not open for further replies.
Level 1
Joined
Jan 23, 2015
Messages
160
I love you guys.

I've gotten over a few hoops & hurdles with the help of the people here, and now I'm asking for help again.

In developing a combat system for my map, I've now come to the most important part, which uses Bribe's damage engine.

I'm using abilities to dictate what is going on. In the following Array, you can see what these abilities are and what they should do for the person who has that ability, when they try to swing at an enemy.

  • Weapons Array
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set WeaponsArray[1] = Weapon Accuracy Base/Strength
      • Set WeaponsArray[2] = Weapon Damage Base/Strength
      • Set WeaponsArray[3] = Weapon Accuracy Base/Agility
      • Set WeaponsArray[4] = Weapon Damage Base/Agility
      • Set WeaponsArray[5] = Weapon Accuracy Base/Intelligence
      • Set WeaponsArray[6] = Weapon Damage Base/Intelligence

I realize the name "Weapons Array" might be a bit misleading. I basically suck at naming things, sorry.

The idea is any unit would have an ability that dictates what their "Chance to hit" is based on, what their "Damage if hit" is based on, and "Chance for critical" is based on. Can be either Str, Agi, Int. My non hero units have artificial Str/Agi/Int scores.

Player's characters, which are heroes, obviously already have these. What I'm doing it, depending on an item they pick up, say a hero finds a sword, that sword should give the hero 3 abilities. Those abilities would be the same three as above, where it dictates what will influence to hit, dmg, and crit chance.

I kind of had a system. It is a long, ugly, beast of a trigger that I'm positive can be condensed and optimized, but I don't know how to go about doing it. What I have now works - sort of. It seems to register the "chance to hit" and I even saw "critical" work once, but when damage is based on strength, it is supposed to do base damage + number from 1 to Damagesource Strength.

I have not been able to make this succeed once. I dumped a bunch of if/then/else statements, and it is a real eyesore, so sorry in advance, but I hope someone can help set me straight here. I expect some harsh criticism, I'm cool with that.

I have here a system supposed to account for each stat, but for sake of ease to anyone trying to help, we can focus on just the stats based on Strength and I can replicate that for the other stats.

  • Set DamageRefine Weapons Array Copy
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventSource is A Hero) Equal to True
          • (DamageEventTarget is A Hero) Equal to True
        • Then - Actions
          • Set TempNonHeroDamageSourceStr = (Strength of DamageEventSource (Include bonuses))
          • Set TempNonHeroDamageSourceAgi = (Agility of DamageEventSource (Include bonuses))
          • Set TempNonHeroDamageSourceInt = (Intelligence of DamageEventSource (Include bonuses))
          • Set TempNonHeroDamageTargetStr = (Strength of DamageEventTarget (Include bonuses))
          • Set TempNonHeroDamageTargetAgi = (Agility of DamageEventTarget (Include bonuses))
          • Set TempNonHeroDamageTargetInt = (Intelligence of DamageEventTarget (Include bonuses))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (DamageEventSource is A Hero) Equal to True
              • (DamageEventTarget is A Hero) Equal to False
            • Then - Actions
              • Set TempNonHeroDamageSourceStr = (Strength of DamageEventSource (Include bonuses))
              • Set TempNonHeroDamageSourceAgi = (Agility of DamageEventSource (Include bonuses))
              • Set TempNonHeroDamageSourceInt = (Intelligence of DamageEventSource (Include bonuses))
              • Set TempNonHeroDamageTargetStr = NonHeroStr[(Custom value of DamageEventTarget)]
              • Set TempNonHeroDamageTargetAgi = NonHeroAgi[(Custom value of DamageEventTarget)]
              • Set TempNonHeroDamageTargetInt = NonHeroInt[(Custom value of DamageEventTarget)]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (DamageEventSource is A Hero) Equal to False
                  • (DamageEventTarget is A Hero) Equal to False
                • Then - Actions
                  • Set TempNonHeroDamageSourceStr = NonHeroStr[(Custom value of DamageEventSource)]
                  • Set TempNonHeroDamageSourceAgi = NonHeroAgi[(Custom value of DamageEventSource)]
                  • Set TempNonHeroDamageSourceInt = NonHeroInt[(Custom value of DamageEventSource)]
                  • Set TempNonHeroDamageTargetStr = NonHeroStr[(Custom value of DamageEventTarget)]
                  • Set TempNonHeroDamageTargetAgi = NonHeroAgi[(Custom value of DamageEventTarget)]
                  • Set TempNonHeroDamageTargetInt = NonHeroInt[(Custom value of DamageEventTarget)]
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (DamageEventSource is A Hero) Equal to False
                      • (DamageEventTarget is A Hero) Equal to True
                    • Then - Actions
                      • Set TempNonHeroDamageSourceStr = NonHeroStr[(Custom value of DamageEventSource)]
                      • Set TempNonHeroDamageSourceAgi = NonHeroAgi[(Custom value of DamageEventSource)]
                      • Set TempNonHeroDamageSourceInt = NonHeroInt[(Custom value of DamageEventSource)]
                      • Set TempNonHeroDamageTargetStr = (Strength of DamageEventTarget (Include bonuses))
                      • Set TempNonHeroDamageTargetAgi = (Agility of DamageEventTarget (Include bonuses))
                      • Set TempNonHeroDamageTargetInt = (Intelligence of DamageEventTarget (Include bonuses))
                    • Else - Actions
      • -------- Swing based on Strength --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of WeaponsArray[1] for DamageEventSource) Greater than 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Random integer number between 0 and 20) + (Random integer number between 0 and TempNonHeroDamageSourceStr)) Greater than or equal to ((Random integer number between 0 and 20) + (Random integer number between 0 and TempNonHeroDamageTargetStr))
            • Then - Actions
              • -------- Damage based on Strength --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of WeaponsArray[2] for DamageEventSource) Greater than 0
                • Then - Actions
                  • -------- Critical Based on Strength --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
                    • Then - Actions
                      • -------- Critical? --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceStr
                        • Then - Actions
                          • -------- Critical! --------
                          • Set DamageEventType = DamageTypeCriticalStrike
                          • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))) x 2.00))
                        • Else - Actions
                          • -------- Regular --------
                          • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))))
                    • Else - Actions
                      • -------- Critical Based on Agility --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
                        • Then - Actions
                          • -------- Critical? --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceAgi
                            • Then - Actions
                              • -------- Critical! --------
                              • Set DamageEventType = DamageTypeCriticalStrike
                              • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))) x 2.00))
                            • Else - Actions
                              • -------- Regular --------
                              • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))))
                        • Else - Actions
                          • -------- Critical Based on Intelligence --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                            • Then - Actions
                              • -------- Critical? --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceInt
                                • Then - Actions
                                  • -------- Critical! --------
                                  • Set DamageEventType = DamageTypeCriticalStrike
                                  • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))) x 2.00))
                                • Else - Actions
                                  • -------- Regular --------
                                  • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))))
                            • Else - Actions
                • Else - Actions
                  • -------- Damage based on Agility --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of WeaponsArray[4] for DamageEventSource) Greater than 0
                    • Then - Actions
                      • -------- Critical Based on Strength --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
                        • Then - Actions
                          • -------- Critical? --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceStr
                            • Then - Actions
                              • -------- Critical! --------
                              • Set DamageEventType = DamageTypeCriticalStrike
                              • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))) x 2.00))
                            • Else - Actions
                              • -------- Regular --------
                              • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))))
                        • Else - Actions
                          • -------- Critical Based on Agility --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
                            • Then - Actions
                              • -------- Critical? --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceAgi
                                • Then - Actions
                                  • -------- Critical! --------
                                  • Set DamageEventType = DamageTypeCriticalStrike
                                  • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))) x 2.00))
                                • Else - Actions
                                  • -------- Regular --------
                                  • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))))
                            • Else - Actions
                              • -------- Critical Based on Intelligence --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                                • Then - Actions
                                  • -------- Critical? --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceInt
                                    • Then - Actions
                                      • -------- Critical! --------
                                      • Set DamageEventType = DamageTypeCriticalStrike
                                      • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))) x 2.00))
                                    • Else - Actions
                                      • -------- Regular --------
                                      • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))))
                                • Else - Actions
                    • Else - Actions
                      • -------- Damage based on Intelligence --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of WeaponsArray[6] for DamageEventSource) Greater than 0
                        • Then - Actions
                          • -------- Critical Based on Strength --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
                            • Then - Actions
                              • -------- Critical? --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceStr
                                • Then - Actions
                                  • -------- Critical! --------
                                  • Set DamageEventType = DamageTypeCriticalStrike
                                  • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))) x 2.00))
                                • Else - Actions
                                  • -------- Regular --------
                                  • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))))
                            • Else - Actions
                              • -------- Critical Based on Agility --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
                                • Then - Actions
                                  • -------- Critical? --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceAgi
                                    • Then - Actions
                                      • -------- Critical! --------
                                      • Set DamageEventType = DamageTypeCriticalStrike
                                      • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))) x 2.00))
                                    • Else - Actions
                                      • -------- Regular --------
                                      • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))))
                                • Else - Actions
                                  • -------- Critical Based on Intelligence --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                                    • Then - Actions
                                      • -------- Critical? --------
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceInt
                                        • Then - Actions
                                          • -------- Critical! --------
                                          • Set DamageEventType = DamageTypeCriticalStrike
                                          • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))) x 2.00))
                                        • Else - Actions
                                          • -------- Regular --------
                                          • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))))
                                    • Else - Actions
                        • Else - Actions
            • Else - Actions
              • Set DamageEventType = DamageTypeMiss
              • Set DamageEventAmount = 0.00
        • Else - Actions
      • -------- Swing based on Agility --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of WeaponsArray[3] for DamageEventSource) Greater than 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Random integer number between 0 and 20) + (Random integer number between 0 and TempNonHeroDamageSourceAgi)) Greater than or equal to ((Random integer number between 0 and 20) + (Random integer number between 0 and TempNonHeroDamageTargetAgi))
            • Then - Actions
              • -------- Damage based on Strength --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of WeaponsArray[2] for DamageEventSource) Greater than 0
                • Then - Actions
                  • -------- Critical Based on Strength --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
                    • Then - Actions
                      • -------- Critical? --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceStr
                        • Then - Actions
                          • -------- Critical! --------
                          • Set DamageEventType = DamageTypeCriticalStrike
                          • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))) x 2.00))
                        • Else - Actions
                          • -------- Regular --------
                          • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))))
                    • Else - Actions
                      • -------- Critical Based on Agility --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
                        • Then - Actions
                          • -------- Critical? --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceAgi
                            • Then - Actions
                              • -------- Critical! --------
                              • Set DamageEventType = DamageTypeCriticalStrike
                              • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))) x 2.00))
                            • Else - Actions
                              • -------- Regular --------
                              • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))))
                        • Else - Actions
                          • -------- Critical Based on Intelligence --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                            • Then - Actions
                              • -------- Critical? --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceInt
                                • Then - Actions
                                  • -------- Critical! --------
                                  • Set DamageEventType = DamageTypeCriticalStrike
                                  • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))) x 2.00))
                                • Else - Actions
                                  • -------- Regular --------
                                  • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))))
                            • Else - Actions
                • Else - Actions
                  • -------- Damage based on Agility --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of WeaponsArray[4] for DamageEventSource) Greater than 0
                    • Then - Actions
                      • -------- Critical Based on Strength --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
                        • Then - Actions
                          • -------- Critical? --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceStr
                            • Then - Actions
                              • -------- Critical! --------
                              • Set DamageEventType = DamageTypeCriticalStrike
                              • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))) x 2.00))
                            • Else - Actions
                              • -------- Regular --------
                              • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))))
                        • Else - Actions
                          • -------- Critical Based on Agility --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
                            • Then - Actions
                              • -------- Critical? --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceAgi
                                • Then - Actions
                                  • -------- Critical! --------
                                  • Set DamageEventType = DamageTypeCriticalStrike
                                  • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))) x 2.00))
                                • Else - Actions
                                  • -------- Regular --------
                                  • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))))
                            • Else - Actions
                              • -------- Critical Based on Intelligence --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                                • Then - Actions
                                  • -------- Critical? --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceInt
                                    • Then - Actions
                                      • -------- Critical! --------
                                      • Set DamageEventType = DamageTypeCriticalStrike
                                      • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))) x 2.00))
                                    • Else - Actions
                                      • -------- Regular --------
                                      • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))))
                                • Else - Actions
                    • Else - Actions
                      • -------- Damage based on Intelligence --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of WeaponsArray[6] for DamageEventSource) Greater than 0
                        • Then - Actions
                          • -------- Critical Based on Strength --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
                            • Then - Actions
                              • -------- Critical? --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceStr
                                • Then - Actions
                                  • -------- Critical! --------
                                  • Set DamageEventType = DamageTypeCriticalStrike
                                  • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))) x 2.00))
                                • Else - Actions
                                  • -------- Regular --------
                                  • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))))
                            • Else - Actions
                              • -------- Critical Based on Agility --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
                                • Then - Actions
                                  • -------- Critical? --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceAgi
                                    • Then - Actions
                                      • -------- Critical! --------
                                      • Set DamageEventType = DamageTypeCriticalStrike
                                      • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))) x 2.00))
                                    • Else - Actions
                                      • -------- Regular --------
                                      • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))))
                                • Else - Actions
                                  • -------- Critical Based on Intelligence --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                                    • Then - Actions
                                      • -------- Critical? --------
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceInt
                                        • Then - Actions
                                          • -------- Critical! --------
                                          • Set DamageEventType = DamageTypeCriticalStrike
                                          • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))) x 2.00))
                                        • Else - Actions
                                          • -------- Regular --------
                                          • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))))
                                    • Else - Actions
                        • Else - Actions
            • Else - Actions
              • Set DamageEventType = DamageTypeMiss
              • Set DamageEventAmount = 0.00
        • Else - Actions
      • -------- Swing based on Intelligence --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of WeaponsArray[3] for DamageEventSource) Greater than 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Random integer number between 0 and 20) + (Random integer number between 0 and TempNonHeroDamageSourceInt)) Greater than or equal to ((Random integer number between 0 and 20) + (Random integer number between 0 and TempNonHeroDamageTargetInt))
            • Then - Actions
              • -------- Damage based on Strength --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of WeaponsArray[2] for DamageEventSource) Greater than 0
                • Then - Actions
                  • -------- Critical Based on Strength --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
                    • Then - Actions
                      • -------- Critical? --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceStr
                        • Then - Actions
                          • -------- Critical! --------
                          • Set DamageEventType = DamageTypeCriticalStrike
                          • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))) x 2.00))
                        • Else - Actions
                          • -------- Regular --------
                          • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))))
                    • Else - Actions
                      • -------- Critical Based on Agility --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
                        • Then - Actions
                          • -------- Critical? --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceAgi
                            • Then - Actions
                              • -------- Critical! --------
                              • Set DamageEventType = DamageTypeCriticalStrike
                              • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))) x 2.00))
                            • Else - Actions
                              • -------- Regular --------
                              • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))))
                        • Else - Actions
                          • -------- Critical Based on Intelligence --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                            • Then - Actions
                              • -------- Critical? --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceInt
                                • Then - Actions
                                  • -------- Critical! --------
                                  • Set DamageEventType = DamageTypeCriticalStrike
                                  • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))) x 2.00))
                                • Else - Actions
                                  • -------- Regular --------
                                  • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))))
                            • Else - Actions
                • Else - Actions
                  • -------- Damage based on Agility --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of WeaponsArray[4] for DamageEventSource) Greater than 0
                    • Then - Actions
                      • -------- Critical Based on Strength --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
                        • Then - Actions
                          • -------- Critical? --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceStr
                            • Then - Actions
                              • -------- Critical! --------
                              • Set DamageEventType = DamageTypeCriticalStrike
                              • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))) x 2.00))
                            • Else - Actions
                              • -------- Regular --------
                              • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))))
                        • Else - Actions
                          • -------- Critical Based on Agility --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
                            • Then - Actions
                              • -------- Critical? --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceAgi
                                • Then - Actions
                                  • -------- Critical! --------
                                  • Set DamageEventType = DamageTypeCriticalStrike
                                  • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))) x 2.00))
                                • Else - Actions
                                  • -------- Regular --------
                                  • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))))
                            • Else - Actions
                              • -------- Critical Based on Intelligence --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                                • Then - Actions
                                  • -------- Critical? --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceInt
                                    • Then - Actions
                                      • -------- Critical! --------
                                      • Set DamageEventType = DamageTypeCriticalStrike
                                      • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))) x 2.00))
                                    • Else - Actions
                                      • -------- Regular --------
                                      • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))))
                                • Else - Actions
                    • Else - Actions
                      • -------- Damage based on Intelligence --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of WeaponsArray[6] for DamageEventSource) Greater than 0
                        • Then - Actions
                          • -------- Critical Based on Strength --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
                            • Then - Actions
                              • -------- Critical? --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceStr
                                • Then - Actions
                                  • -------- Critical! --------
                                  • Set DamageEventType = DamageTypeCriticalStrike
                                  • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))) x 2.00))
                                • Else - Actions
                                  • -------- Regular --------
                                  • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))))
                            • Else - Actions
                              • -------- Critical Based on Agility --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
                                • Then - Actions
                                  • -------- Critical? --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceAgi
                                    • Then - Actions
                                      • -------- Critical! --------
                                      • Set DamageEventType = DamageTypeCriticalStrike
                                      • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))) x 2.00))
                                    • Else - Actions
                                      • -------- Regular --------
                                      • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))))
                                • Else - Actions
                                  • -------- Critical Based on Intelligence --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                                    • Then - Actions
                                      • -------- Critical? --------
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceInt
                                        • Then - Actions
                                          • -------- Critical! --------
                                          • Set DamageEventType = DamageTypeCriticalStrike
                                          • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))) x 2.00))
                                        • Else - Actions
                                          • -------- Regular --------
                                          • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))))
                                    • Else - Actions
                        • Else - Actions
            • Else - Actions
              • Set DamageEventType = DamageTypeMiss
              • Set DamageEventAmount = 0.00
        • Else - Actions
      • -------- Swing based on Fist --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of WeaponsArray[1] for DamageEventSource) Less than or equal to 0
          • (Level of WeaponsArray[3] for DamageEventSource) Less than or equal to 0
          • (Level of WeaponsArray[5] for DamageEventSource) Less than or equal to 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Random integer number between 0 and 20) + (Random integer number between 0 and TempNonHeroDamageSourceInt)) Greater than or equal to ((Random integer number between 0 and 20) + (Random integer number between 0 and TempNonHeroDamageTargetInt))
            • Then - Actions
              • -------- Damage based on Strength --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of WeaponsArray[2] for DamageEventSource) Greater than 0
                • Then - Actions
                  • -------- Critical Based on Strength --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
                    • Then - Actions
                      • -------- Critical? --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceStr
                        • Then - Actions
                          • -------- Critical! --------
                          • Set DamageEventType = DamageTypeCriticalStrike
                          • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))) x 2.00))
                        • Else - Actions
                          • -------- Regular --------
                          • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))))
                    • Else - Actions
                      • -------- Critical Based on Agility --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
                        • Then - Actions
                          • -------- Critical? --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceAgi
                            • Then - Actions
                              • -------- Critical! --------
                              • Set DamageEventType = DamageTypeCriticalStrike
                              • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))) x 2.00))
                            • Else - Actions
                              • -------- Regular --------
                              • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))))
                        • Else - Actions
                          • -------- Critical Based on Intelligence --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                            • Then - Actions
                              • -------- Critical? --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceInt
                                • Then - Actions
                                  • -------- Critical! --------
                                  • Set DamageEventType = DamageTypeCriticalStrike
                                  • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))) x 2.00))
                                • Else - Actions
                                  • -------- Regular --------
                                  • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceStr))))
                            • Else - Actions
                • Else - Actions
                  • -------- Damage based on Agility --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of WeaponsArray[4] for DamageEventSource) Greater than 0
                    • Then - Actions
                      • -------- Critical Based on Strength --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
                        • Then - Actions
                          • -------- Critical? --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceStr
                            • Then - Actions
                              • -------- Critical! --------
                              • Set DamageEventType = DamageTypeCriticalStrike
                              • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))) x 2.00))
                            • Else - Actions
                              • -------- Regular --------
                              • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))))
                        • Else - Actions
                          • -------- Critical Based on Agility --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
                            • Then - Actions
                              • -------- Critical? --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceAgi
                                • Then - Actions
                                  • -------- Critical! --------
                                  • Set DamageEventType = DamageTypeCriticalStrike
                                  • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))) x 2.00))
                                • Else - Actions
                                  • -------- Regular --------
                                  • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))))
                            • Else - Actions
                              • -------- Critical Based on Intelligence --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                                • Then - Actions
                                  • -------- Critical? --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceInt
                                    • Then - Actions
                                      • -------- Critical! --------
                                      • Set DamageEventType = DamageTypeCriticalStrike
                                      • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))) x 2.00))
                                    • Else - Actions
                                      • -------- Regular --------
                                      • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceAgi))))
                                • Else - Actions
                    • Else - Actions
                      • -------- Damage based on Intelligence --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of WeaponsArray[6] for DamageEventSource) Greater than 0
                        • Then - Actions
                          • -------- Critical Based on Strength --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
                            • Then - Actions
                              • -------- Critical? --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceStr
                                • Then - Actions
                                  • -------- Critical! --------
                                  • Set DamageEventType = DamageTypeCriticalStrike
                                  • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))) x 2.00))
                                • Else - Actions
                                  • -------- Regular --------
                                  • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))))
                            • Else - Actions
                              • -------- Critical Based on Agility --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
                                • Then - Actions
                                  • -------- Critical? --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceAgi
                                    • Then - Actions
                                      • -------- Critical! --------
                                      • Set DamageEventType = DamageTypeCriticalStrike
                                      • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))) x 2.00))
                                    • Else - Actions
                                      • -------- Regular --------
                                      • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))))
                                • Else - Actions
                                  • -------- Critical Based on Intelligence --------
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                                    • Then - Actions
                                      • -------- Critical? --------
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Random integer number between 1 and 100) Less than or equal to TempNonHeroDamageSourceInt
                                        • Then - Actions
                                          • -------- Critical! --------
                                          • Set DamageEventType = DamageTypeCriticalStrike
                                          • Set DamageEventAmount = (DamageEventAmount + ((Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))) x 2.00))
                                        • Else - Actions
                                          • -------- Regular --------
                                          • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(TempNonHeroDamageSourceInt))))
                                    • Else - Actions
                        • Else - Actions
            • Else - Actions
              • Set DamageEventType = DamageTypeMiss
              • Set DamageEventAmount = 0.00
        • Else - Actions
      • -------- Swing based on Fist --------
 
This looks quite redundant. I would add 4 new values "attackStat", "defenseStat", "damageStat" & "critStat".
The 4 values will take over the needed StatValue from attacker and target according to swing type, crit type and damage type, Each is a own If then else path setting them.
Then after finding the correct ones you once roll attack vs defense, then try crit and deal damage.
Looks somehow like this:
  • attack
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • -------- STR swing? --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Weapon STR for DamageEventSource) Greater than 0
        • Then - Actions
          • -------- use str as attack --------
          • Set AttackStat = TempNonHeroDamageSourceStr
          • Set DefenseStat = TempNonHeroDamageTargetSTR
        • Else - Actions
          • -------- AGI swing? --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
            • Else - Actions
              • -------- Int swing? --------
      • -------- you could now test, if it hit at all, would skip further if elses. --------
      • -------- - --------
      • -------- Now you got attack and defense. --------
      • -------- Get DamageStat --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of DAMAGE STR for DamageEventSource) Greater than 0
        • Then - Actions
          • Set DamageStat = TempNonHeroDamageSourceStr
        • Else - Actions
      • -------- Get CritStat --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of CRIT STR for DamageEventSource) Greater than 0
        • Then - Actions
          • Set CritStat = TempNonHeroDamageSourceStr
        • Else - Actions
      • -------- Do the work --------
      • Set AttackStat = ((Random integer number between 0 and AttackStat) + (Random integer number between 0 and 20))
      • Set DefenseStat = ((Random integer number between 0 and DefenseStat) + (Random integer number between 0 and 20))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AttackStat Greater than DefenseStat
        • Then - Actions
          • -------- Try Crit --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to CritStat
            • Then - Actions
              • -------- crit --------
              • Set DamageEventAmount = (DamageEventAmount + 2 x (Random real number between 1.00 and (Real(DamageStat))))
            • Else - Actions
              • -------- normal --------
              • Set DamageEventAmount = (DamageEventAmount + (Random real number between 1.00 and (Real(DamageStat))))
        • Else - Actions
          • -------- Missed --------
 
Level 1
Joined
Jan 23, 2015
Messages
160
Hey buddy sorry for the long wait. I gave your method a try, this is what I've got. The problem that occurs is when a miss is registered the target still takes damage. Everything look ok here? I think I'm close.
  • From Hive
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventSource is A Hero) Equal to True
          • (DamageEventTarget is A Hero) Equal to True
        • Then - Actions
          • Set TempNonHeroDamageSourceStr = (Strength of DamageEventSource (Include bonuses))
          • Set TempNonHeroDamageSourceAgi = (Agility of DamageEventSource (Include bonuses))
          • Set TempNonHeroDamageSourceInt = (Intelligence of DamageEventSource (Include bonuses))
          • Set TempNonHeroDamageTargetStr = (Strength of DamageEventTarget (Include bonuses))
          • Set TempNonHeroDamageTargetAgi = (Agility of DamageEventTarget (Include bonuses))
          • Set TempNonHeroDamageTargetInt = (Intelligence of DamageEventTarget (Include bonuses))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (DamageEventSource is A Hero) Equal to True
              • (DamageEventTarget is A Hero) Equal to False
            • Then - Actions
              • Set TempNonHeroDamageSourceStr = (Strength of DamageEventSource (Include bonuses))
              • Set TempNonHeroDamageSourceAgi = (Agility of DamageEventSource (Include bonuses))
              • Set TempNonHeroDamageSourceInt = (Intelligence of DamageEventSource (Include bonuses))
              • Set TempNonHeroDamageTargetStr = NonHeroStr[(Custom value of DamageEventTarget)]
              • Set TempNonHeroDamageTargetAgi = NonHeroAgi[(Custom value of DamageEventTarget)]
              • Set TempNonHeroDamageTargetInt = NonHeroInt[(Custom value of DamageEventTarget)]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (DamageEventSource is A Hero) Equal to False
                  • (DamageEventTarget is A Hero) Equal to False
                • Then - Actions
                  • Set TempNonHeroDamageSourceStr = NonHeroStr[(Custom value of DamageEventSource)]
                  • Set TempNonHeroDamageSourceAgi = NonHeroAgi[(Custom value of DamageEventSource)]
                  • Set TempNonHeroDamageSourceInt = NonHeroInt[(Custom value of DamageEventSource)]
                  • Set TempNonHeroDamageTargetStr = NonHeroStr[(Custom value of DamageEventTarget)]
                  • Set TempNonHeroDamageTargetAgi = NonHeroAgi[(Custom value of DamageEventTarget)]
                  • Set TempNonHeroDamageTargetInt = NonHeroInt[(Custom value of DamageEventTarget)]
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (DamageEventSource is A Hero) Equal to False
                      • (DamageEventTarget is A Hero) Equal to True
                    • Then - Actions
                      • Set TempNonHeroDamageSourceStr = NonHeroStr[(Custom value of DamageEventSource)]
                      • Set TempNonHeroDamageSourceAgi = NonHeroAgi[(Custom value of DamageEventSource)]
                      • Set TempNonHeroDamageSourceInt = NonHeroInt[(Custom value of DamageEventSource)]
                      • Set TempNonHeroDamageTargetStr = (Strength of DamageEventTarget (Include bonuses))
                      • Set TempNonHeroDamageTargetAgi = (Agility of DamageEventTarget (Include bonuses))
                      • Set TempNonHeroDamageTargetInt = (Intelligence of DamageEventTarget (Include bonuses))
                    • Else - Actions
      • -------- Swing based on Strength --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Weapon Accuracy Base/Strength for DamageEventSource) Greater than 0
        • Then - Actions
          • -------- Strength based attack --------
          • Set Attackstat = TempNonHeroDamageSourceStr
          • Set Defensestat = TempNonHeroDamageTargetStr
        • Else - Actions
          • -------- Swing Based on Agi --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Weapon Accuracy Base/Agility for DamageEventSource) Greater than 0
            • Then - Actions
              • -------- Agility based attack --------
              • Set Attackstat = TempNonHeroDamageSourceAgi
              • Set Defensestat = TempNonHeroDamageTargetAgi
            • Else - Actions
              • -------- Swing based on Intelligence --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Weapon Accuracy Base/Intelligence for DamageEventSource) Greater than 0
                • Then - Actions
                  • -------- Intelligence based attack --------
                  • Set Attackstat = TempNonHeroDamageSourceInt
                  • Set Defensestat = TempNonHeroDamageTargetInt
                • Else - Actions
      • -------- Get Damage Stat --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Weapon Damage Base/Strength for DamageEventSource) Greater than 0
        • Then - Actions
          • Set Damagestat = TempNonHeroDamageSourceStr
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Weapon Damage Base/Agility for DamageEventSource) Greater than 0
            • Then - Actions
              • Set Damagestat = TempNonHeroDamageSourceAgi
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Weapon Damage Base/Intelligence for DamageEventSource) Greater than 0
                • Then - Actions
                  • Set Damagestat = TempNonHeroDamageSourceInt
                • Else - Actions
      • -------- Get Crit Stat --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Weapon Critical Base/Strength for DamageEventSource) Greater than 0
        • Then - Actions
          • Set Critstat = TempNonHeroDamageSourceStr
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Weapon Critical Base/Agi for DamageEventSource) Greater than 0
            • Then - Actions
              • Set Critstat = TempNonHeroDamageSourceAgi
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Weapon Critical Base/Intelligence for DamageEventSource) Greater than 0
                • Then - Actions
                  • Set Critstat = TempNonHeroDamageSourceInt
                • Else - Actions
      • -------- Do the work --------
      • Set Attackstat = ((Random integer number between 0 and Attackstat) + (Random integer number between 0 and 20))
      • Set Defensestat = ((Random integer number between 0 and Defensestat) + (Random integer number between 0 and 20))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Attackstat Greater than Defensestat
        • Then - Actions
          • -------- Try Crit --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to Critstat
            • Then - Actions
              • -------- Critical --------
              • Set DamageEvent = (DamageEvent + (2.00 x (Real(Damagestat))))
            • Else - Actions
              • -------- Normal --------
              • Set DamageEvent = (DamageEvent + (Random real number between 1.00 and (Real(Damagestat))))
        • Else - Actions
          • -------- Miss --------
          • Set DamageEvent = 0.00
          • Set DamageEventType = DamageTypeMiss
 
Status
Not open for further replies.
Top