• 🏆 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!

Custom Combat System

Status
Not open for further replies.
Level 6
Joined
Apr 1, 2009
Messages
201
I'm trying to create a custom combat system based on 8 basic abilities. Four of the abilities are offensive and the other four are defensive. The offensive abilities can be cast while the defensive abilities are passive. Each ability has a formula based on the players heroes attributes. What I'm trying to do is create more triggers and add more than 8 abilities, create another trigger to randomly pick one of the multiple defensive abilities a hero may have to combat an offensive ability, and another trigger to see which one of the abilities formula is higher. If the offensive ability is higher then the target takes damage and if the defensive ability is higher then the target blocks the attack. I've already started the triggering but could really use some help, any help at all would be greatly appreciated. Preferably I'd like to do this in GUI because I've only worked with it and have no experience with any other form of triggering.
 
Level 9
Joined
Jul 4, 2007
Messages
130
do you want something like ...

-an ogre attack, any random offensive shit is taken, it is str * 2 formula ! he have 15 str so 30.

-the target of the ogre is a grunt, any random defensive shit is taken, it is int * 5 formula ! he have 1 int so 5.

30 > 5 the grunt takes damage.

... that?
 
Level 6
Joined
Apr 1, 2009
Messages
201
do you want something like ...

-an ogre attack, any random offensive shit is taken, it is str * 2 formula ! he have 15 str so 30.

-the target of the ogre is a grunt, any random defensive shit is taken, it is int * 5 formula ! he have 1 int so 5.

30 > 5 the grunt takes damage.

... that?

I was more of looking for a condition where the four defensive abilities are stored and randomly pick one of the defensive spells the hero has to face off against the offensive spell. I'm not sure how to do this. But here is what I came up with so far, hoping people can build on and tell me if I'm doing something wrong.

  • Example
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Slash
    • Actions
      • Set SlashCaster = (Triggering unit)
      • Set SlashTarget = (Target unit of ability being cast)
      • Set SlashCasterLevel = (Real((Hero level of SlashCaster)))
      • Set SlashTargetLevel = (Real((Hero level of SlashTarget)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SlashCasterLevel Greater than SlashTargetLevel
        • Then - Actions
          • Set SlashCasterLevel = SlashHigherLevel
          • Set SlashTargetLevel = SlashLowerLevel
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SlashCasterLevel Less than SlashTargetLevel
            • Then - Actions
              • Set SlashTargetLevel = SlashHigherLevel
              • Set SlashCasterLevel = SlashLowerLevel
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SlashCasterLevel Equal to SlashTargetLevel
                • Then - Actions
                  • Set SlashTargetLevel = SlashHigherLevel
                  • Set SlashCasterLevel = SlashLowerLevel
                • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Dodge for SlashTarget) Equal to 1
        • Then - Actions
          • Set SlashFormulaStr = (0.30 x (Real((Strength of SlashCaster (Include bonuses)))))
          • Set SlashFormulaAgi = (0.40 x (Real((Agility of SlashCaster (Include bonuses)))))
          • Set SlashFormulaInt = (0.10 x (Real((Intelligence of SlashCaster (Include bonuses)))))
          • Set DodgeFormulaStr = (0.05 x (Real((Strength of SlashTarget (Include bonuses)))))
          • Set DodgeFormulaAgi = (0.50 x (Real((Agility of SlashTarget (Include bonuses)))))
          • Set DodgeFormulaInt = (0.20 x (Real((Intelligence of SlashCaster (Include bonuses)))))
          • Set SlashPercentageTotal = ((SlashPercentageBase + SlashFormulaAgi) + (SlashFormulaStr + SlashFormulaInt))
          • Set DodgePercentageTotal = ((DodgePercentageBase + DodgeFormulaAgi) + (DodgeFormulaStr + DodgeFormulaInt))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((SlashPercentageTotal - DodgePercentageTotal) - (SlashHigherLevel - SlashLowerLevel)) Greater than DodgePercentageTotal
            • Then - Actions
              • Unit - Cause SlashCaster to damage SlashTarget, dealing 1.00 damage of attack type Spells and damage type Normal
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((SlashPercentageTotal - DodgePercentageTotal) - (SlashHigherLevel - SlashLowerLevel)) Less than DodgePercentageTotal
                • Then - Actions
                  • Floating Text - Create floating text that reads Dodged! at (Position of SlashTarget) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((SlashPercentageTotal - DodgePercentageTotal) - (SlashHigherLevel - SlashLowerLevel)) Equal to 0.00
                    • Then - Actions
                      • Floating Text - Create floating text that reads Stand Off! at (Position of SlashTarget) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                    • Else - Actions
        • Else - Actions
 
Status
Not open for further replies.
Top