Compare commits
2 Commits
8f60079e6e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12fdde6ca4 | ||
|
|
732ee9a953 |
@@ -1,17 +1,17 @@
|
||||
apply plugin: 'java'
|
||||
|
||||
group "mod.sin"
|
||||
version "4.1"
|
||||
version "4.2"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
maven { url "https://dl.bdew.net/agorepo/" }
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url "http://gotti.no-ip.org/maven/repository" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'org.gotti.wurmunlimited:server-modlauncher:0.40'
|
||||
compile 'com.github.ago1024:WurmServerModLauncher:v0.46'
|
||||
compile 'com.github.Sindusk:sindusklibrary:v2.1'
|
||||
}
|
||||
|
||||
|
||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Wed Jul 02 15:54:47 CDT 2014
|
||||
#Tue Nov 04 09:53:21 EST 2025
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip
|
||||
|
||||
@@ -2,6 +2,8 @@ package mod.sin.armoury;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.wurmonline.server.spells.EnchantUtil;
|
||||
import com.wurmonline.server.spells.Spell;
|
||||
import mod.sin.lib.Util;
|
||||
import org.gotti.wurmunlimited.modloader.classhooks.HookManager;
|
||||
|
||||
@@ -35,19 +37,19 @@ public class ShieldsTweaks {
|
||||
boolean playSound = false;
|
||||
if (shield.getBonusForSpellEffect(Enchants.BUFF_ROTTING_TOUCH) > 0f) {
|
||||
double damage = shield.getBonusForSpellEffect(Enchants.BUFF_ROTTING_TOUCH) * 31d;
|
||||
attacker.addWoundOfType(defender, Wound.TYPE_INFECTION, 0, true, 1.0f, true, damage);
|
||||
attacker.addWoundOfType(defender, Wound.TYPE_INFECTION, 0, true, 1.0f, true, damage, 0, 0, false, true);
|
||||
playSound = true;
|
||||
} else if (shield.getBonusForSpellEffect(Enchants.BUFF_FLAMING_AURA) > 0f) {
|
||||
double damage = shield.getBonusForSpellEffect(Enchants.BUFF_FLAMING_AURA) * 27d;
|
||||
attacker.addWoundOfType(defender, Wound.TYPE_BURN, 0, true, 1.0f, true, damage);
|
||||
attacker.addWoundOfType(defender, Wound.TYPE_BURN, 0, true, 1.0f, true, damage, 0, 0, false, true);
|
||||
playSound = true;
|
||||
} else if (shield.getBonusForSpellEffect(Enchants.BUFF_FROSTBRAND) > 0f) {
|
||||
double damage = shield.getBonusForSpellEffect(Enchants.BUFF_FROSTBRAND) * 28d;
|
||||
attacker.addWoundOfType(defender, Wound.TYPE_COLD, 0, true, 1.0f, true, damage);
|
||||
attacker.addWoundOfType(defender, Wound.TYPE_COLD, 0, true, 1.0f, true, damage, 0, 0, false, true);
|
||||
playSound = true;
|
||||
} else if (shield.getBonusForSpellEffect(Enchants.BUFF_VENOM) > 0f) {
|
||||
double damage = shield.getBonusForSpellEffect(Enchants.BUFF_VENOM) * 30d;
|
||||
attacker.addWoundOfType(defender, Wound.TYPE_POISON, 0, true, 1.0f, true, damage);
|
||||
attacker.addWoundOfType(defender, Wound.TYPE_POISON, 0, true, 1.0f, true, damage, 0, 0, false, true);
|
||||
playSound = true;
|
||||
}
|
||||
if (playSound) {
|
||||
@@ -56,6 +58,18 @@ public class ShieldsTweaks {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean shieldIsValidItemType(Spell spell, Creature performer, Item target) {
|
||||
if (spell.isTargetArmour() && target.isShield()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (spell.isTargetWeapon() && target.isShield()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void preInit() {
|
||||
try {
|
||||
ClassPool classPool = HookManager.getInstance().getClassPool();
|
||||
@@ -75,6 +89,15 @@ public class ShieldsTweaks {
|
||||
}
|
||||
}
|
||||
});*/
|
||||
|
||||
CtClass ctSpell = classPool.get("com.wurmonline.server.spells.Spell");
|
||||
String shieldSpellCheck = ShieldsTweaks.class.getName() + ".shieldIsValidItemType(this, performer, target)";
|
||||
String spellCheckReplace = "if (" + shieldSpellCheck + ") {" +
|
||||
"return true;" +
|
||||
"}";
|
||||
Util.setReason("Enable enchanting shields with damage enchants.");
|
||||
Util.insertBeforeDeclared(thisClass, ctSpell, "isValidItemType", spellCheckReplace);
|
||||
|
||||
}
|
||||
if (ArmouryModMain.enableShieldSpeedEnchants) {
|
||||
CtClass ctCombatHandler = classPool.get("com.wurmonline.server.creatures.CombatHandler");
|
||||
|
||||
Reference in New Issue
Block a user