The More RPG Library introduces the Rage Melee spell school, which combines melee combat with rage-based mechanics. This school rewards aggressive, low-health playstyles.
Rage Melee School
Rage Melee is a unique spell school that scales with both attack damage and a custom Rage attribute, making it perfect for berserker and warrior archetypes.
School Properties
- Color:
0xb3b3b3 (gray)
- Archetype:
MELEE
- Damage Type:
DamageTypes.PLAYER_ATTACK
- ID:
spell_power:rage_melee
- Base Attribute:
EntityAttributes.GENERIC_ATTACK_DAMAGE
Registration
Rage Melee is registered with the MELEE archetype:
public static final SpellSchool RAGE_MELEE = new SpellSchool(
SpellSchool.Archetype.MELEE,
Identifier.of(SpellPowerMod.ID, "rage_melee"),
0xb3b3b3,
DamageTypes.PLAYER_ATTACK,
EntityAttributes.GENERIC_ATTACK_DAMAGE
);
Power Calculation
Rage Melee has a unique power calculation that incorporates the Rage attribute:
RAGE_MELEE.addSource(SpellSchool.Trait.POWER, SpellSchool.Apply.ADD, query -> {
return query.entity().getAttributeValue(EntityAttributes.GENERIC_ATTACK_DAMAGE) +
((query.entity().getAttributeValue(MRPGCEntityAttributes.RAGE_MODIFIER)-100) / 10);
});
Rage Melee Power = Attack Damage + ((Rage Modifier - 100) / 10)
Where:
- Attack Damage: The entity’s generic attack damage attribute
- Rage Modifier: Custom attribute from
MRPGCEntityAttributes.RAGE_MODIFIER
- The base rage modifier is 100, so any value above 100 increases power
Example Calculations
Example 1
Example 2
Example 3
Base Character
- Attack Damage: 5
- Rage Modifier: 100 (base value)
Calculation:Power = 5 + ((100 - 100) / 10)
Power = 5 + 0
Power = 5
Enraged Character
- Attack Damage: 5
- Rage Modifier: 150
Calculation:Power = 5 + ((150 - 100) / 10)
Power = 5 + 5
Power = 10
The character gains +5 power from rage! Heavily Enraged
- Attack Damage: 8
- Rage Modifier: 200
Calculation:Power = 8 + ((200 - 100) / 10)
Power = 8 + 10
Power = 18
Massive power boost from high rage!
Rage Attribute Mechanics
The Rage attribute is described in the library’s README:
Rage Attribute: You’ll deal more damage with your melee attacks, the less health you have.Full Formula: Base Attack Damage + (Generic Attack Damage * Rage Attribute % * Missing Health %)This makes Rage Melee especially powerful when at low health, rewarding risky aggressive playstyles.
Attack Speed Integration
Rage Melee is configured with spell haste support:
SpellSchools.configureSpellHaste(RAGE_MELEE);
This allows the spell school to benefit from attack speed modifiers.
Critical Strike Support
When the Critical Strike mod is loaded, Rage Melee gains critical strike capabilities:
RAGE_MELEE.addSource(SpellSchool.Trait.CRIT_CHANCE, SpellSchool.Apply.ADD, query -> {
var value = query.entity().getAttributeValue(
CriticalStrikeAttributes.CHANCE.attributeEntry
);
return (double) CriticalStrikeAttributes.CHANCE.asChance(value);
});
RAGE_MELEE.addSource(SpellSchool.Trait.CRIT_DAMAGE, SpellSchool.Apply.ADD, query -> {
var value = query.entity().getAttributeValue(
CriticalStrikeAttributes.DAMAGE.attributeEntry
);
return CriticalStrikeAttributes.DAMAGE.asMultiplier(value) - 1;
});
SpellSchools.configureSpellCritDamage(RAGE_MELEE);
SpellSchools.configureSpellCritChance(RAGE_MELEE);
Critical Strike integration is automatic when the mod is present and requires no additional configuration.
Synergistic Status Effects
Rage Melee works exceptionally well with several status effects from the library:
- Bleeding: Increases damage against low-health targets, synergizing with the rage mechanic
- Stagger: Reduces enemy armor and movement, allowing you to stay in melee range
- Ignited: Prevents enemy movement and reduces healing, perfect for aggressive melee combat
Using Rage Melee
To use Rage Melee in your spells, reference it in your spell JSON files:
{
"school": "spell_power:rage_melee",
"power": 12.0,
"cost": {
"durability": 1
}
}
Implementation Example
The complete registration in MoreSpellSchools.initialize():
public static void initialize() {
// ... magic schools registration
// Rage Melee power calculation
RAGE_MELEE.addSource(SpellSchool.Trait.POWER, SpellSchool.Apply.ADD, query -> {
return query.entity().getAttributeValue(EntityAttributes.GENERIC_ATTACK_DAMAGE) +
((query.entity().getAttributeValue(MRPGCEntityAttributes.RAGE_MODIFIER)-100) / 10);
});
// Configure haste
SpellSchools.configureSpellHaste(RAGE_MELEE);
// Critical Strike integration (if mod is loaded)
if (FabricLoader.getInstance().isModLoaded("critical_strike")) {
RAGE_MELEE.addSource(SpellSchool.Trait.CRIT_CHANCE, SpellSchool.Apply.ADD, query -> {
var value = query.entity().getAttributeValue(
CriticalStrikeAttributes.CHANCE.attributeEntry
);
return (double) CriticalStrikeAttributes.CHANCE.asChance(value);
});
RAGE_MELEE.addSource(SpellSchool.Trait.CRIT_DAMAGE, SpellSchool.Apply.ADD, query -> {
var value = query.entity().getAttributeValue(
CriticalStrikeAttributes.DAMAGE.attributeEntry
);
return CriticalStrikeAttributes.DAMAGE.asMultiplier(value) - 1;
});
SpellSchools.configureSpellCritDamage(RAGE_MELEE);
SpellSchools.configureSpellCritChance(RAGE_MELEE);
}
// Register the school
SpellSchools.register(RAGE_MELEE);
}