mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-26 15:39:37 +00:00
Adding Elemental DMG Bonus
Added Elemental DMG Bonus command. > /stats <epyro | ecryo | ehydro | egeo | edend | eelec | ephys> <amount>
This commit is contained in:
parent
19572f46e3
commit
d0529641b3
@ -115,6 +115,119 @@ public class SetStats implements CommandHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "epyro":
|
||||||
|
try {
|
||||||
|
float epyro = Integer.parseInt(args.get(1));
|
||||||
|
EntityAvatar entity = sender.getTeamManager().getCurrentAvatarEntity();
|
||||||
|
float pyro = epyro / 10000;
|
||||||
|
entity.setFightProperty(FightProperty.FIGHT_PROP_FIRE_ADD_HURT, pyro);
|
||||||
|
entity.getWorld().broadcastPacket(new PacketEntityFightPropUpdateNotify(entity, FightProperty.FIGHT_PROP_FIRE_ADD_HURT));
|
||||||
|
float igpyro = pyro * 100;
|
||||||
|
CommandHandler.sendMessage(sender, "Pyro DMG Bonus set to " + igpyro + "%");
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
CommandHandler.sendMessage(sender, "Invalid Pyro DMG Bonus value.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "ecryo":
|
||||||
|
try {
|
||||||
|
float ecryo = Integer.parseInt(args.get(1));
|
||||||
|
EntityAvatar entity = sender.getTeamManager().getCurrentAvatarEntity();
|
||||||
|
float cryo = ecryo / 10000;
|
||||||
|
entity.setFightProperty(FightProperty.FIGHT_PROP_ICE_ADD_HURT, cryo);
|
||||||
|
entity.getWorld().broadcastPacket(new PacketEntityFightPropUpdateNotify(entity, FightProperty.FIGHT_PROP_ICE_ADD_HURT));
|
||||||
|
float igcyro = cryo * 100;
|
||||||
|
CommandHandler.sendMessage(sender, "Cyro DMG Bonus set to " + igcyro + "%");
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
CommandHandler.sendMessage(sender, "Invalid Cryo DMG Bonus value.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "ehydro":
|
||||||
|
try {
|
||||||
|
float ehydro = Integer.parseInt(args.get(1));
|
||||||
|
EntityAvatar entity = sender.getTeamManager().getCurrentAvatarEntity();
|
||||||
|
float hydro = ehydro / 10000;
|
||||||
|
entity.setFightProperty(FightProperty.FIGHT_PROP_WATER_ADD_HURT, hydro);
|
||||||
|
entity.getWorld().broadcastPacket(new PacketEntityFightPropUpdateNotify(entity, FightProperty.FIGHT_PROP_WATER_ADD_HURT));
|
||||||
|
float ighydro = hydro * 100;
|
||||||
|
CommandHandler.sendMessage(sender, "Hydro DMG Bonus set to " + ighydro + "%");
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
CommandHandler.sendMessage(sender, "Invalid Hydro DMG Bonus value.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "eanemo":
|
||||||
|
try {
|
||||||
|
float eanemo = Integer.parseInt(args.get(1));
|
||||||
|
EntityAvatar entity = sender.getTeamManager().getCurrentAvatarEntity();
|
||||||
|
float anemo = eanemo / 10000;
|
||||||
|
entity.setFightProperty(FightProperty.FIGHT_PROP_WIND_ADD_HURT, anemo);
|
||||||
|
entity.getWorld().broadcastPacket(new PacketEntityFightPropUpdateNotify(entity, FightProperty.FIGHT_PROP_WIND_ADD_HURT));
|
||||||
|
float iganemo = anemo * 100;
|
||||||
|
CommandHandler.sendMessage(sender, "Anemo DMG Bonus set to " + iganemo + "%");
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
CommandHandler.sendMessage(sender, "Invalid Anemo DMG Bonus value.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "egeo":
|
||||||
|
try {
|
||||||
|
float egeo = Integer.parseInt(args.get(1));
|
||||||
|
EntityAvatar entity = sender.getTeamManager().getCurrentAvatarEntity();
|
||||||
|
float geo = egeo / 10000;
|
||||||
|
entity.setFightProperty(FightProperty.FIGHT_PROP_ROCK_ADD_HURT, geo);
|
||||||
|
entity.getWorld().broadcastPacket(new PacketEntityFightPropUpdateNotify(entity, FightProperty.FIGHT_PROP_ROCK_ADD_HURT));
|
||||||
|
float iggeo = geo * 100;
|
||||||
|
CommandHandler.sendMessage(sender, "Geo DMG Bonus set to " + iggeo + "%");
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
CommandHandler.sendMessage(sender, "Invalid Geo DMG Bonus value.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "ethunder":
|
||||||
|
case "eelec":
|
||||||
|
try {
|
||||||
|
float eelec = Integer.parseInt(args.get(1));
|
||||||
|
EntityAvatar entity = sender.getTeamManager().getCurrentAvatarEntity();
|
||||||
|
float elec = eelec / 10000;
|
||||||
|
entity.setFightProperty(FightProperty.FIGHT_PROP_CRITICAL_HURT, elec);
|
||||||
|
entity.getWorld().broadcastPacket(new PacketEntityFightPropUpdateNotify(entity, FightProperty.FIGHT_PROP_CRITICAL_HURT));
|
||||||
|
float igelec = elec * 100;
|
||||||
|
CommandHandler.sendMessage(sender, "Electro DMG Bonus set to " + igelec + "%");
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
CommandHandler.sendMessage(sender, "Invalid Electro DMG Bonus value.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "ephys":
|
||||||
|
try {
|
||||||
|
float ephys = Integer.parseInt(args.get(1));
|
||||||
|
EntityAvatar entity = sender.getTeamManager().getCurrentAvatarEntity();
|
||||||
|
float phys = ephys / 10000;
|
||||||
|
entity.setFightProperty(FightProperty.FIGHT_PROP_PHYSICAL_ADD_HURT, phys);
|
||||||
|
entity.getWorld().broadcastPacket(new PacketEntityFightPropUpdateNotify(entity, FightProperty.FIGHT_PROP_PHYSICAL_ADD_HURT));
|
||||||
|
float igphys = phys * 100;
|
||||||
|
CommandHandler.sendMessage(sender, "Physical DMG Bonus set to " + igphys + "%");
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
CommandHandler.sendMessage(sender, "Invalid Physical DMG Bonus value.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "edend":
|
||||||
|
try {
|
||||||
|
float edend = Integer.parseInt(args.get(1));
|
||||||
|
EntityAvatar entity = sender.getTeamManager().getCurrentAvatarEntity();
|
||||||
|
float dend = edend / 10000;
|
||||||
|
entity.setFightProperty(FightProperty.FIGHT_PROP_GRASS_ADD_HURT, dend);
|
||||||
|
entity.getWorld().broadcastPacket(new PacketEntityFightPropUpdateNotify(entity, FightProperty.FIGHT_PROP_GRASS_ADD_HURT));
|
||||||
|
float igdend = dend * 100;
|
||||||
|
CommandHandler.sendMessage(sender, "Dendro DMG Bonus set to " + igdend + "%");
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
CommandHandler.sendMessage(sender, "Invalid Dendro DMG Bonus value.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user