Skip to main content

Weapon Combo Examples

Weapon combos allow you to create dynamic combat systems where consecutive hits trigger different effects. These examples demonstrate how to implement practical combo systems for different weapon types.

Overview

The combo system tracks player input sequences and executes different skills based on the combo count. This creates engaging combat mechanics where timing and positioning matter.

Combo Sword

A melee weapon that tracks consecutive hits and triggers different effects based on combo count.

Configuration

test-combo_sword:
  Id: DIAMOND_SWORD
  Display: "<#DC143C>Combo Sword"  
  Lore:
  - "&6Combo &r&8» <#DC143C>Test Combo &e3🕑"
  - "&o&7Consecutive hits cause different effects!"
  Skills:
  - skill{s=[
      - skill{s=combo-apply;maxcombo=5;reset=3;
        name="Randomness";id=test-shot-exec;
        spellcooldown=3}
      - skill{s=combo-hit;id=test-shot-exec;
        1=[ - message{m="Hit 1"} ];
        2=[ - message{m="Hit 2"} ];
        3=[ - message{m="Hit 3"} ];
        4=[ - message{m="Hit 4"} ];
        5=[ - message{m="Hit 5"} ]}
    ]} @self ~onAttack ?equipslot{slot=HAND}

How It Works

The combo-apply skill manages the combo state:
- skill{s=combo-apply;maxcombo=5;reset=3;
  name="Randomness";id=test-shot-exec;
  spellcooldown=3}
Parameters:
  • maxcombo=5: Maximum combo count (resets after 5)
  • reset=3: Reset timer in seconds (combo resets if no hit within 3s)
  • name="Randomness": Internal identifier for this combo
  • id=test-shot-exec: Unique ID for tracking
  • spellcooldown=3: Cooldown after max combo reached
The combo-hit skill defines what happens at each combo level:
- skill{s=combo-hit;id=test-shot-exec;
  1=[ - message{m="Hit 1"} ];
  2=[ - message{m="Hit 2"} ];
  3=[ - message{m="Hit 3"} ];
  4=[ - message{m="Hit 4"} ];
  5=[ - message{m="Hit 5"} ]}
Each number corresponds to a combo count and executes a skill list. Replace the messages with actual combat skills.
The skill triggers on attack when equipped:
@self ~onAttack ?equipslot{slot=HAND}
  • ~onAttack: Triggers when player attacks
  • ?equipslot{slot=HAND}: Only when item is in main hand

Practical Implementation

Replace the test messages with real combat skills:
test-combo_sword:
  Id: DIAMOND_SWORD
  Display: "<#FF6B6B>Blazing Combo Sword"  
  Lore:
  - "&6Combo &r&8» <#FF6B6B>Fire Strikes &e3🕑"
  - "&o&7Build up devastating fire attacks!"
  Skills:
  - skill{s=[
      - skill{s=combo-apply;maxcombo=5;reset=3;
        name="FireCombo";id=fire-combo;
        spellcooldown=5}
      - skill{s=combo-hit;id=fire-combo;
        1=[ 
          - damage{a=5}
          - e:p{p=flame;a=3}
        ];
        2=[ 
          - damage{a=8}
          - e:p{p=flame;a=6}
          - sound{s=entity.blaze.shoot}
        ];
        3=[ 
          - damage{a=12}
          - e:p{p=flame;a=10}
          - ignite{t=40}
        ];
        4=[ 
          - damage{a=15}
          - e:p{p=flame;a=15}
          - ignite{t=60}
          - sound{s=entity.generic.explode;p=1.5}
        ];
        5=[ 
          - damage{a=25}
          - e:p{p=explosion;a=3}
          - e:p{p=flame;a=20}
          - ignite{t=100}
          - sound{s=entity.generic.explode}
        ]}
    ]} @Target ~onAttack ?equipslot{slot=HAND}

Combo System Integration

The combo system requires two core skills that work together:

combo-apply

Manages combo state and timing:
Parameters:
  maxcombo: Maximum combo count before reset
  reset: Seconds before combo resets
  name: Display name for combo
  id: Unique identifier
  spellcooldown: Cooldown after max combo

combo-hit

Executes skills based on combo count:
Parameters:
  id: Must match combo-apply id
  1, 2, 3, 4, 5...: Skill lists for each combo level

Design Patterns

Progressive Damage

1=[ - damage{a=5} ];
2=[ - damage{a=8} ];
3=[ - damage{a=12} ];
4=[ - damage{a=18} ];
5=[ - damage{a=30} ];
Increase damage with each hit to reward consistent play.

Status Effect Chains

1=[ - potion{t=SLOWNESS;l=1;d=40} ];
2=[ - potion{t=SLOWNESS;l=2;d=60} ];
3=[ - potion{t=WEAKNESS;l=1;d=60} - potion{t=SLOWNESS;l=2;d=60} ];
4=[ - potion{t=WEAKNESS;l=2;d=80} - potion{t=SLOWNESS;l=3;d=80} ];
5=[ - potion{t=WITHER;l=2;d=100} ];
Stack debuffs that culminate in a powerful final effect.

Elemental Progression

1=[ - ignite{t=40} - e:p{p=flame} ];  # Fire
2=[ - lightning{sync=true} - e:p{p=electric_spark} ];  # Lightning  
3=[ - potion{t=SLOWNESS;l=3} - e:p{p=snow_shovel} ];  # Ice
4=[ - potion{t=POISON;l=2;d=80} - e:p{p=slime} ];  # Nature
5=[ - pull{v=5} - damage{a=25} - e:p{p=portal} ];  # Void
Cycle through elements for visual variety.

Area Effects at Milestones

1=[ - damage{a=8} ];
2=[ - damage{a=10} ];
3=[ - damage{a=12} - skill{s=small-aoe} @ENO{r=3} ];  # AoE at 3
4=[ - damage{a=15} ];
5=[ - damage{a=20} - skill{s=large-aoe} @ENO{r=5} ];  # Bigger AoE at 5
Reward combo milestones with area damage.

Advanced Techniques

Combo Branching

Create different combo paths based on conditions:
test-branching_sword:
  Id: DIAMOND_SWORD
  Display: "<#FFD700>Adaptive Sword"
  Skills:
  - skill{s=[
      - skill{s=combo-apply;maxcombo=3;reset=3;name="Branch";id=branch-combo;spellcooldown=4}
      - skill{s=combo-hit;id=branch-combo;
        1=[ - damage{a=10} ];
        2=[ - damage{a=15} - setvar{var=branch;val=1} ];
        3=[
          - skill{s=fire-finisher} ?varequals{var=branch;val=1}
          - skill{s=ice-finisher} ?varequals{var=branch;val=2}
        ]}
    ]} @Target ~onAttack ?equipslot{slot=HAND}
  
  # Hold shift at hit 2 for ice path
  - skill{s=[ - setvar{var=branch;val=2} ]} @self ~onAttack ?isCrouching ?equipslot{slot=HAND}

Combo Reset Rewards

Grant bonuses when maintaining max combo:
- skill{s=[
    - skill{s=combo-apply;maxcombo=5;reset=2;name="Maintain";id=maintain-combo;spellcooldown=0}
    - skill{s=combo-hit;id=maintain-combo;
      5=[
        - damage{a=30}
        - aura{name=combo-master;d=5;i=1;
          onTick=[
            - e:p{p=reddust;color=#FFD700;size=1.5}
            - modifyDamage{m=1.2}
          ]}
      ]}
  ]} @Target ~onAttack ?equipslot{slot=HAND}

Full Example: Warrior’s Blade

test-combo_weapons-items.yml
test-combo_sword:
  Id: DIAMOND_SWORD
  Display: "<#DC143C>Combo Sword"  
  Lore:
  - "&6Combo &r&8» <#DC143C>Test Combo &e3🕑"
  - "&o&7Consecutive hits cause different effects!"
  Skills:
  - skill{s=[
      - skill{s=combo-apply;maxcombo=5;reset=3;
        name="Randomness";id=test-shot-exec;
        spellcooldown=3}
      - skill{s=combo-hit;id=test-shot-exec;
        1=[ - message{m="Hit 1"} ];
        2=[ - message{m="Hit 2"} ];
        3=[ - message{m="Hit 3"} ];
        4=[ - message{m="Hit 4"} ];
        5=[ - message{m="Hit 5"} ]}
    ]} @self ~onAttack ?equipslot{slot=HAND}

test-combo_bow:
  Id: BOW
  Display: "<#DC143C>Combo Bow"  
  Lore:
  - "&6Combo &r&8» <#DC143C>Test Bow Combo &e3🕑"
  - "&o&7Consecutive hits cause... effects?"
  Skills:
  - skill{s=[
      - skill{s=combo-apply;maxcombo=5;reset=3;
        name="Randomness2";id=test-spiralshot-exec;
        spellcooldown=3}
      - skill{s=combo-hit;id=test-spiralshot-exec;
        1=[ - vskill{s=[ - message{m=hit testing} ]} @self ];
        2=[ - vskill{s=arrow_explosive-fire;origin=@selfeyelocation;damage="1.2*<caster.damage>";delay=2} @trigger{yo=1.5} ];
        3=[ - message{m="Hit 3"} ];
        4=[ - message{m="Hit 4"} ];
        5=[ - message{m="Hit 5"} ]}
    ]} @self ~onBowHit ?equipslot{slot=HAND}

Next Steps

Demo Spells

Integrate spell systems with weapon combos

Custom Items

Create items that work with combos

Skill Reference

Browse all available skills

Item System

Deep dive into item configuration

Build docs developers (and LLMs) love