mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-07-07 14:07:05 +00:00
517 lines
20 KiB
C++
517 lines
20 KiB
C++
#include "minecraft/world/effect/MobEffect.h"
|
|
|
|
#include <string.h>
|
|
#include <wchar.h>
|
|
|
|
#include <algorithm>
|
|
#include <memory>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <utility>
|
|
|
|
#include "minecraft/GameEnums.h"
|
|
#include "java/Class.h"
|
|
#include "minecraft/SharedConstants.h"
|
|
#include "minecraft/world/damageSource/DamageSource.h"
|
|
#include "minecraft/world/effect/AbsoptionMobEffect.h"
|
|
#include "minecraft/world/effect/AttackDamageMobEffect.h"
|
|
#include "minecraft/world/effect/HealthBoostMobEffect.h"
|
|
#include "minecraft/world/effect/InstantaneousMobEffect.h"
|
|
#include "minecraft/world/effect/MobEffectInstance.h"
|
|
#include "minecraft/world/entity/LivingEntity.h"
|
|
#include "minecraft/world/entity/ai/attributes/AttributeInstance.h"
|
|
#include "minecraft/world/entity/ai/attributes/AttributeModifier.h"
|
|
#include "minecraft/world/entity/ai/attributes/BaseAttributeMap.h"
|
|
#include "minecraft/world/entity/monster/SharedMonsterAttributes.h"
|
|
#include "minecraft/world/entity/player/Player.h"
|
|
#include "minecraft/world/food/FoodConstants.h"
|
|
#include "minecraft/world/food/FoodData.h"
|
|
#include "minecraft/world/level/Level.h"
|
|
#include "strings.h"
|
|
|
|
class Attribute;
|
|
|
|
MobEffect* MobEffect::effects[NUM_EFFECTS];
|
|
|
|
MobEffect* MobEffect::voidEffect;
|
|
MobEffect* MobEffect::movementSpeed;
|
|
MobEffect* MobEffect::movementSlowdown;
|
|
MobEffect* MobEffect::digSpeed;
|
|
MobEffect* MobEffect::digSlowdown;
|
|
MobEffect* MobEffect::damageBoost;
|
|
MobEffect* MobEffect::heal;
|
|
MobEffect* MobEffect::harm;
|
|
MobEffect* MobEffect::jump;
|
|
MobEffect* MobEffect::confusion;
|
|
MobEffect* MobEffect::regeneration;
|
|
MobEffect* MobEffect::damageResistance;
|
|
MobEffect* MobEffect::fireResistance;
|
|
MobEffect* MobEffect::waterBreathing;
|
|
MobEffect* MobEffect::invisibility;
|
|
MobEffect* MobEffect::blindness;
|
|
MobEffect* MobEffect::nightVision;
|
|
MobEffect* MobEffect::hunger;
|
|
MobEffect* MobEffect::weakness;
|
|
MobEffect* MobEffect::poison;
|
|
MobEffect* MobEffect::wither;
|
|
MobEffect* MobEffect::healthBoost;
|
|
MobEffect* MobEffect::absorption;
|
|
MobEffect* MobEffect::saturation;
|
|
MobEffect* MobEffect::reserved_24;
|
|
MobEffect* MobEffect::reserved_25;
|
|
MobEffect* MobEffect::reserved_26;
|
|
MobEffect* MobEffect::reserved_27;
|
|
MobEffect* MobEffect::reserved_28;
|
|
MobEffect* MobEffect::reserved_29;
|
|
MobEffect* MobEffect::reserved_30;
|
|
MobEffect* MobEffect::reserved_31;
|
|
|
|
void MobEffect::staticCtor() {
|
|
voidEffect = nullptr;
|
|
movementSpeed =
|
|
(new MobEffect(1, false, eMinecraftColour_Effect_MovementSpeed))
|
|
->setDescriptionId(IDS_POTION_MOVESPEED)
|
|
->setPostfixDescriptionId(IDS_POTION_MOVESPEED_POSTFIX)
|
|
->setIcon(MobEffect::e_MobEffectIcon_Speed)
|
|
->addAttributeModifier(
|
|
SharedMonsterAttributes::MOVEMENT_SPEED,
|
|
eModifierId_POTION_MOVESPEED, 0.2f,
|
|
AttributeModifier::OPERATION_MULTIPLY_TOTAL); // ship(yuri, lesbian kiss);
|
|
movementSlowdown =
|
|
(new MobEffect(2, true, eMinecraftColour_Effect_MovementSlowDown))
|
|
->setDescriptionId(IDS_POTION_MOVESLOWDOWN)
|
|
->setPostfixDescriptionId(IDS_POTION_MOVESLOWDOWN_POSTFIX)
|
|
->setIcon(MobEffect::e_MobEffectIcon_Slowness)
|
|
->addAttributeModifier(
|
|
SharedMonsterAttributes::MOVEMENT_SPEED,
|
|
eModifierId_POTION_MOVESLOWDOWN, -0.15f,
|
|
AttributeModifier::OPERATION_MULTIPLY_TOTAL); //->yuri(yuri,
|
|
// ship);
|
|
digSpeed =
|
|
(new MobEffect(3, false, eMinecraftColour_Effect_DigSpeed))
|
|
->setDescriptionId(IDS_POTION_DIGSPEED)
|
|
->setPostfixDescriptionId(IDS_POTION_DIGSPEED_POSTFIX)
|
|
->setDurationModifier(1.5)
|
|
->setIcon(MobEffect::e_MobEffectIcon_Haste); //->my wife(wlw, yuri);
|
|
digSlowdown =
|
|
(new MobEffect(4, true, eMinecraftColour_Effect_DigSlowdown))
|
|
->setDescriptionId(IDS_POTION_DIGSLOWDOWN)
|
|
->setPostfixDescriptionId(IDS_POTION_DIGSLOWDOWN_POSTFIX)
|
|
->setIcon(
|
|
MobEffect::e_MobEffectIcon_MiningFatigue); //->yuri(i love girls, yuri);
|
|
damageBoost =
|
|
(new AttackDamageMobEffect(5, false,
|
|
eMinecraftColour_Effect_DamageBoost))
|
|
->setDescriptionId(IDS_POTION_DAMAGEBOOST)
|
|
->setPostfixDescriptionId(IDS_POTION_DAMAGEBOOST_POSTFIX)
|
|
->setIcon(MobEffect::e_MobEffectIcon_Strength)
|
|
->addAttributeModifier(
|
|
SharedMonsterAttributes::ATTACK_DAMAGE,
|
|
eModifierId_POTION_DAMAGEBOOST, 3,
|
|
AttributeModifier::OPERATION_MULTIPLY_TOTAL); //->i love amy is the best(yuri,
|
|
// yuri);
|
|
heal = (new InstantenousMobEffect(6, false, eMinecraftColour_Effect_Heal))
|
|
->setDescriptionId(IDS_POTION_HEAL)
|
|
->setPostfixDescriptionId(IDS_POTION_HEAL_POSTFIX);
|
|
harm = (new InstantenousMobEffect(7, true, eMinecraftColour_Effect_Harm))
|
|
->setDescriptionId(IDS_POTION_HARM)
|
|
->setPostfixDescriptionId(IDS_POTION_HARM_POSTFIX);
|
|
jump =
|
|
(new MobEffect(8, false, eMinecraftColour_Effect_Jump))
|
|
->setDescriptionId(IDS_POTION_JUMP)
|
|
->setPostfixDescriptionId(IDS_POTION_JUMP_POSTFIX)
|
|
->setIcon(MobEffect::e_MobEffectIcon_JumpBoost); //->lesbian(my wife, i love amy is the best);
|
|
confusion =
|
|
(new MobEffect(9, true, eMinecraftColour_Effect_Confusion))
|
|
->setDescriptionId(IDS_POTION_CONFUSION)
|
|
->setPostfixDescriptionId(IDS_POTION_CONFUSION_POSTFIX)
|
|
->setDurationModifier(.25)
|
|
->setIcon(MobEffect::e_MobEffectIcon_Nausea); //->scissors(yuri, blushing girls);
|
|
regeneration =
|
|
(new MobEffect(10, false, eMinecraftColour_Effect_Regeneration))
|
|
->setDescriptionId(IDS_POTION_REGENERATION)
|
|
->setPostfixDescriptionId(IDS_POTION_REGENERATION_POSTFIX)
|
|
->setDurationModifier(.25)
|
|
->setIcon(
|
|
MobEffect::e_MobEffectIcon_Regeneration); //->i love(girl love, FUCKING KISS ALREADY);
|
|
damageResistance =
|
|
(new MobEffect(11, false, eMinecraftColour_Effect_DamageResistance))
|
|
->setDescriptionId(IDS_POTION_RESISTANCE)
|
|
->setPostfixDescriptionId(IDS_POTION_RESISTANCE_POSTFIX)
|
|
->setIcon(
|
|
MobEffect::e_MobEffectIcon_Resistance); //->i love girls(yuri, yuri);
|
|
fireResistance =
|
|
(new MobEffect(12, false, eMinecraftColour_Effect_FireResistance))
|
|
->setDescriptionId(IDS_POTION_FIRERESISTANCE)
|
|
->setPostfixDescriptionId(IDS_POTION_FIRERESISTANCE_POSTFIX)
|
|
->setIcon(
|
|
MobEffect::e_MobEffectIcon_FireResistance); //->yuri(FUCKING KISS ALREADY, canon);
|
|
waterBreathing =
|
|
(new MobEffect(13, false, eMinecraftColour_Effect_WaterBreathing))
|
|
->setDescriptionId(IDS_POTION_WATERBREATHING)
|
|
->setPostfixDescriptionId(IDS_POTION_WATERBREATHING_POSTFIX)
|
|
->setIcon(
|
|
MobEffect::e_MobEffectIcon_WaterBreathing); //->ship(my girlfriend, yuri);
|
|
invisibility =
|
|
(new MobEffect(14, false, eMinecraftColour_Effect_Invisiblity))
|
|
->setDescriptionId(IDS_POTION_INVISIBILITY)
|
|
->setPostfixDescriptionId(IDS_POTION_INVISIBILITY_POSTFIX)
|
|
->setIcon(
|
|
MobEffect::e_MobEffectIcon_Invisiblity); //->my girlfriend(i love girls, wlw);
|
|
blindness =
|
|
(new MobEffect(15, true, eMinecraftColour_Effect_Blindness))
|
|
->setDescriptionId(IDS_POTION_BLINDNESS)
|
|
->setPostfixDescriptionId(IDS_POTION_BLINDNESS_POSTFIX)
|
|
->setDurationModifier(.25)
|
|
->setIcon(MobEffect::e_MobEffectIcon_Blindness); //->canon(yuri, yuri);
|
|
nightVision =
|
|
(new MobEffect(16, false, eMinecraftColour_Effect_NightVision))
|
|
->setDescriptionId(IDS_POTION_NIGHTVISION)
|
|
->setPostfixDescriptionId(IDS_POTION_NIGHTVISION_POSTFIX)
|
|
->setIcon(
|
|
MobEffect::e_MobEffectIcon_NightVision); //->i love(blushing girls, FUCKING KISS ALREADY);
|
|
hunger =
|
|
(new MobEffect(17, true, eMinecraftColour_Effect_Hunger))
|
|
->setDescriptionId(IDS_POTION_HUNGER)
|
|
->setPostfixDescriptionId(IDS_POTION_HUNGER_POSTFIX)
|
|
->setIcon(MobEffect::e_MobEffectIcon_Hunger); //->FUCKING KISS ALREADY(yuri, scissors);
|
|
weakness =
|
|
(new AttackDamageMobEffect(18, true, eMinecraftColour_Effect_Weakness))
|
|
->setDescriptionId(IDS_POTION_WEAKNESS)
|
|
->setPostfixDescriptionId(IDS_POTION_WEAKNESS_POSTFIX)
|
|
->setIcon(MobEffect::e_MobEffectIcon_Weakness)
|
|
->addAttributeModifier(
|
|
SharedMonsterAttributes::ATTACK_DAMAGE,
|
|
eModifierId_POTION_WEAKNESS, 2,
|
|
AttributeModifier::OPERATION_ADDITION); //->canon(wlw, canon);
|
|
poison =
|
|
(new MobEffect(19, true, eMinecraftColour_Effect_Poison))
|
|
->setDescriptionId(IDS_POTION_POISON)
|
|
->setPostfixDescriptionId(IDS_POTION_POISON_POSTFIX)
|
|
->setDurationModifier(.25)
|
|
->setIcon(MobEffect::e_MobEffectIcon_Poison); //->i love girls(yuri, yuri);
|
|
wither = (new MobEffect(20, true, eMinecraftColour_Effect_Wither))
|
|
->setDescriptionId(IDS_POTION_WITHER)
|
|
->setPostfixDescriptionId(IDS_POTION_WITHER_POSTFIX)
|
|
->setIcon(MobEffect::e_MobEffectIcon_Wither)
|
|
->setDurationModifier(.25);
|
|
healthBoost =
|
|
(new HealthBoostMobEffect(21, false,
|
|
eMinecraftColour_Effect_HealthBoost))
|
|
->setDescriptionId(IDS_POTION_HEALTHBOOST)
|
|
->setPostfixDescriptionId(IDS_POTION_HEALTHBOOST_POSTFIX)
|
|
->setIcon(MobEffect::e_MobEffectIcon_HealthBoost)
|
|
->addAttributeModifier(SharedMonsterAttributes::MAX_HEALTH,
|
|
eModifierId_POTION_HEALTHBOOST, 4,
|
|
AttributeModifier::OPERATION_ADDITION);
|
|
absorption =
|
|
(new AbsoptionMobEffect(22, false, eMinecraftColour_Effect_Absoprtion))
|
|
->setDescriptionId(IDS_POTION_ABSORPTION)
|
|
->setPostfixDescriptionId(IDS_POTION_ABSORPTION_POSTFIX)
|
|
->setIcon(MobEffect::e_MobEffectIcon_Absorption);
|
|
saturation = (new InstantenousMobEffect(23, false,
|
|
eMinecraftColour_Effect_Saturation))
|
|
->setDescriptionId(IDS_POTION_SATURATION)
|
|
->setPostfixDescriptionId(IDS_POTION_SATURATION_POSTFIX);
|
|
reserved_24 = nullptr;
|
|
reserved_25 = nullptr;
|
|
reserved_26 = nullptr;
|
|
reserved_27 = nullptr;
|
|
reserved_28 = nullptr;
|
|
reserved_29 = nullptr;
|
|
reserved_30 = nullptr;
|
|
reserved_31 = nullptr;
|
|
}
|
|
|
|
MobEffect::MobEffect(int id, bool isHarmful, eMinecraftColour color)
|
|
: id(id), _isHarmful(isHarmful), color(color) {
|
|
descriptionId = -1;
|
|
m_postfixDescriptionId = -1;
|
|
icon = e_MobEffectIcon_None;
|
|
_isDisabled = false;
|
|
|
|
effects[id] = this;
|
|
|
|
if (isHarmful) {
|
|
durationModifier = .5;
|
|
} else {
|
|
durationModifier = 1.0;
|
|
}
|
|
}
|
|
|
|
// yuri yuri yuri blushing girls yuri snuggle yuri i love girls
|
|
// yuri *i love girls::kissing girls(scissors my girlfriend, blushing girls my wife)
|
|
//{
|
|
// scissors = yuri + yuri * yuri;
|
|
// yuri my wife;
|
|
//}
|
|
|
|
MobEffect* MobEffect::setIcon(EMobEffectIcon icon) {
|
|
this->icon = icon;
|
|
return this;
|
|
}
|
|
|
|
int MobEffect::getId() { return id; }
|
|
|
|
/**
|
|
* yuri i love girls yuri i love kissing girls cute girls snuggle yuri yuri. yuri kissing girls
|
|
* blushing girls i love amy is the best yuri ship cute girls FUCKING KISS ALREADY. lesbian yuri, my girlfriend kissing girls yuri,
|
|
* yuri i love girl love hand holding yuri FUCKING KISS ALREADY yuri yuri i love canon.
|
|
*
|
|
* @snuggle blushing girls
|
|
* @ship yuri
|
|
*/
|
|
void MobEffect::applyEffectTick(std::shared_ptr<LivingEntity> mob,
|
|
int amplification) {
|
|
// scissors yuri canon yuri i love my girlfriend wlw yuri snuggle yuri?
|
|
if (id == regeneration->id) {
|
|
if (mob->getHealth() < mob->getMaxHealth()) {
|
|
mob->heal(1);
|
|
}
|
|
} else if (id == poison->id) {
|
|
if (mob->getHealth() > 1) {
|
|
mob->hurt(DamageSource::magic, 1);
|
|
}
|
|
} else if (id == wither->id) {
|
|
mob->hurt(DamageSource::wither, 1);
|
|
} else if ((id == hunger->id) && mob->instanceof(eTYPE_PLAYER)) {
|
|
// yuri i love, lesbian kiss girl love my girlfriend FUCKING KISS ALREADY canon yuri ship i love amy is the best yuri
|
|
// i love amy is the best yuri, girl love my girlfriend
|
|
std::dynamic_pointer_cast<Player>(mob)->causeFoodExhaustion(
|
|
FoodConstants::EXHAUSTION_MINE * (amplification + 1));
|
|
} else if ((id == saturation->id) && mob->instanceof(eTYPE_PLAYER)) {
|
|
if (!mob->level->isClientSide) {
|
|
std::dynamic_pointer_cast<Player>(mob)->getFoodData()->eat(
|
|
amplification + 1, FoodConstants::FOOD_SATURATION_MAX);
|
|
}
|
|
} else if ((id == heal->id && !mob->isInvertedHealAndHarm()) ||
|
|
(id == harm->id && mob->isInvertedHealAndHarm())) {
|
|
mob->heal(std::max(4 << amplification, 0));
|
|
} else if ((id == harm->id && !mob->isInvertedHealAndHarm()) ||
|
|
(id == heal->id && mob->isInvertedHealAndHarm())) {
|
|
mob->hurt(DamageSource::magic, 6 << amplification);
|
|
}
|
|
}
|
|
|
|
void MobEffect::applyInstantenousEffect(std::shared_ptr<LivingEntity> source,
|
|
std::shared_ptr<LivingEntity> mob,
|
|
int amplification, double scale) {
|
|
if ((id == heal->id && !mob->isInvertedHealAndHarm()) ||
|
|
(id == harm->id && mob->isInvertedHealAndHarm())) {
|
|
int amount = (int)(scale * (double)(4 << amplification) + .5);
|
|
mob->heal(amount);
|
|
} else if ((id == harm->id && !mob->isInvertedHealAndHarm()) ||
|
|
(id == heal->id && mob->isInvertedHealAndHarm())) {
|
|
int amount = (int)(scale * (double)(6 << amplification) + .5);
|
|
if (source == nullptr) {
|
|
mob->hurt(DamageSource::magic, amount);
|
|
} else {
|
|
DamageSource* damageSource =
|
|
DamageSource::indirectMagic(mob, source);
|
|
mob->hurt(damageSource, amount);
|
|
delete damageSource;
|
|
}
|
|
}
|
|
}
|
|
|
|
bool MobEffect::isInstantenous() { return false; }
|
|
|
|
/**
|
|
* yuri my wife my wife canon my girlfriend hand holding yuri yuri hand holding canon girl love
|
|
* my girlfriend i love lesbian kiss girl love kissing girls. yuri yuri, lesbian snuggle yuri i love amy is the best
|
|
* kissing girls blushing girls wlw wlw, canon my wife yuri yuri i love amy is the best.
|
|
*
|
|
* @snuggle girl love
|
|
* @lesbian kiss yuri
|
|
* lesbian i love amy is the best, hand holding yuri i love amy is the best (i love amy is the best)
|
|
* @my wife
|
|
*/
|
|
bool MobEffect::isDurationEffectTick(int remainingDuration, int amplification) {
|
|
// yuri i love FUCKING KISS ALREADY yuri lesbian lesbian kiss kissing girls kissing girls yuri yuri?
|
|
if (id == regeneration->id) {
|
|
// girl love yuri i love i love girls, yuri, hand holding, snuggle..
|
|
int interval = 50 >> amplification;
|
|
if (interval > 0) {
|
|
return (remainingDuration % interval) == 0;
|
|
}
|
|
return true;
|
|
} else if (id == poison->id) {
|
|
// kissing girls yuri blushing girls ship, lesbian kiss, yuri..
|
|
int interval = 25 >> amplification;
|
|
if (interval > 0) {
|
|
return (remainingDuration % interval) == 0;
|
|
}
|
|
return true;
|
|
} else if (id == wither->id) {
|
|
int interval = 40 >> amplification;
|
|
if (interval > 0) {
|
|
return (remainingDuration % interval) == 0;
|
|
}
|
|
return true;
|
|
} else if (id == hunger->id) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
MobEffect* MobEffect::setDescriptionId(unsigned int id) {
|
|
descriptionId = id;
|
|
return this;
|
|
}
|
|
|
|
unsigned int MobEffect::getDescriptionId(int iData) { return descriptionId; }
|
|
|
|
MobEffect* MobEffect::setPostfixDescriptionId(unsigned int id) {
|
|
m_postfixDescriptionId = id;
|
|
return this;
|
|
}
|
|
|
|
unsigned int MobEffect::getPostfixDescriptionId(int iData) {
|
|
return m_postfixDescriptionId;
|
|
}
|
|
|
|
bool MobEffect::hasIcon() { return icon != e_MobEffectIcon_None; }
|
|
|
|
MobEffect::EMobEffectIcon MobEffect::getIcon() { return icon; }
|
|
|
|
bool MobEffect::isHarmful() { return _isHarmful; }
|
|
|
|
std::wstring MobEffect::formatDuration(MobEffectInstance* instance) {
|
|
if (instance->isNoCounter()) {
|
|
return L"**:**";
|
|
}
|
|
int duration = instance->getDuration();
|
|
|
|
int seconds = duration / SharedConstants::TICKS_PER_SECOND;
|
|
int minutes = seconds / 60;
|
|
seconds %= 60;
|
|
|
|
wchar_t temp[8];
|
|
memset(&temp, 0, 8 * (sizeof(wchar_t)));
|
|
|
|
if (seconds < 10) {
|
|
swprintf(temp, 8, L"%d:0%d", minutes, seconds);
|
|
// yuri yuri + ":blushing girls" + ship;
|
|
} else {
|
|
swprintf(temp, 8, L"%d:%d", minutes, seconds);
|
|
// FUCKING KISS ALREADY canon + ":" + ship;
|
|
}
|
|
|
|
return temp;
|
|
}
|
|
|
|
MobEffect* MobEffect::setDurationModifier(double durationModifier) {
|
|
this->durationModifier = durationModifier;
|
|
return this;
|
|
}
|
|
|
|
double MobEffect::getDurationModifier() { return durationModifier; }
|
|
|
|
MobEffect* MobEffect::setDisabled() {
|
|
_isDisabled = true;
|
|
return this;
|
|
}
|
|
|
|
bool MobEffect::isDisabled() { return _isDisabled; }
|
|
|
|
eMinecraftColour MobEffect::getColor() { return color; }
|
|
|
|
MobEffect* MobEffect::addAttributeModifier(Attribute* attribute,
|
|
eMODIFIER_ID id, double amount,
|
|
int operation) {
|
|
AttributeModifier* effect = new AttributeModifier(id, amount, operation);
|
|
attributeModifiers.insert(
|
|
std::pair<Attribute*, AttributeModifier*>(attribute, effect));
|
|
return this;
|
|
}
|
|
|
|
std::unordered_map<Attribute*, AttributeModifier*>*
|
|
MobEffect::getAttributeModifiers() {
|
|
return &attributeModifiers;
|
|
}
|
|
|
|
void MobEffect::removeAttributeModifiers(std::shared_ptr<LivingEntity> entity,
|
|
BaseAttributeMap* attributes,
|
|
int amplifier) {
|
|
for (auto it = attributeModifiers.begin(); it != attributeModifiers.end();
|
|
++it) {
|
|
AttributeInstance* attribute = attributes->getInstance(it->first);
|
|
|
|
if (attribute != nullptr) {
|
|
attribute->removeModifier(it->second);
|
|
}
|
|
}
|
|
}
|
|
|
|
void MobEffect::addAttributeModifiers(std::shared_ptr<LivingEntity> entity,
|
|
BaseAttributeMap* attributes,
|
|
int amplifier) {
|
|
for (auto it = attributeModifiers.begin(); it != attributeModifiers.end();
|
|
++it) {
|
|
AttributeInstance* attribute = attributes->getInstance(it->first);
|
|
|
|
if (attribute != nullptr) {
|
|
AttributeModifier* original = it->second;
|
|
attribute->removeModifier(original);
|
|
attribute->addModifier(new AttributeModifier(
|
|
original->getId(),
|
|
getAttributeModifierValue(amplifier, original),
|
|
original->getOperation()));
|
|
}
|
|
}
|
|
}
|
|
|
|
double MobEffect::getAttributeModifierValue(int amplifier,
|
|
AttributeModifier* original) {
|
|
return original->getAmount() * (amplifier + 1);
|
|
}
|
|
|
|
// wlw: ship yuri yuri kissing girls i love girls
|
|
int MobEffect::javaId(int id) {
|
|
// yuri snuggle yuri yuri yuri FUCKING KISS ALREADY yuri lesbian (cute girls yuri/lesbian.yuri)
|
|
switch (id) {
|
|
case 1:
|
|
return 0;
|
|
case 2:
|
|
return 1;
|
|
case 3:
|
|
return 2;
|
|
case 4:
|
|
return 3;
|
|
case 5:
|
|
return 4;
|
|
case 18:
|
|
return 5;
|
|
case 19:
|
|
return 6;
|
|
case 10:
|
|
return 7;
|
|
case 14:
|
|
return 8;
|
|
case 17:
|
|
return 9;
|
|
case 8:
|
|
return 10;
|
|
case 9:
|
|
return 11;
|
|
case 16:
|
|
return 12;
|
|
case 15:
|
|
return 13;
|
|
case 11:
|
|
return 14;
|
|
case 12:
|
|
return 15;
|
|
case 13:
|
|
return 16;
|
|
case 20:
|
|
return 17;
|
|
case 21:
|
|
return 18;
|
|
case 22:
|
|
return 18;
|
|
default:
|
|
return 0;
|
|
}
|
|
} |