void LightsaberCrystalComponentImplementation::updateCraftingValues(CraftingValues* values, bool firstUpdate) { int colorMax = values->getMaxValue("color"); int color = values->getCurrentValue("color"); setMaxCondition(values->getCurrentValue("hitpoints")); if (colorMax != 31) { int finalColor = MIN(color, 11); setColor(finalColor); updateCrystal(finalColor); } else { setColor(31); updateCrystal(31); } if (color == 31){ setQuality(values->getCurrentValue("quality")); setAttackSpeed(Math::getPrecision(values->getCurrentValue("attackspeed"), 2)); setMinimumDamage(MIN(values->getCurrentValue("mindamage"), 50)); setMaximumDamage(MIN(values->getCurrentValue("maxdamage"), 50)); setWoundChance(values->getCurrentValue("woundchance")); // Following are incoming positive values in script (Due to loot modifier.) // Switch to negative number. setSacHealth(MIN(values->getCurrentValue("attackhealthcost"), 9) * -1); setSacAction(MIN(values->getCurrentValue("attackactioncost"), 9) * -1); setSacMind(MIN(values->getCurrentValue("attackmindcost"), 9) * -1); setForceCost(MIN(values->getCurrentValue("forcecost"), 9) * -1); } ComponentImplementation::updateCraftingValues(values, firstUpdate); }
//============HumanoidCombatComponent======= HumanoidCombatComponent::HumanoidCombatComponent(int HP, int maxHP, float damage, float attackRange, float attackSpeed) { setMaxHP(maxHP); setHP(maxHP); setDamage(damage); setAttackRange(attackRange); setAttackSpeed(attackSpeed); setMarkedForRemoval(false); }
HumanoidCombatComponent::HumanoidCombatComponent(objectCombat settings) { setMaxHP(settings.maxHP); setHP(settings.maxHP); setDamage(settings.damage); setAttackRange(settings.attackRange); setAttackSpeed(settings.attackSpeed); setAlive(true); setMarkedForRemoval(false); }
Flame::Flame() { setTypeID(Boss_Flame); setCurrHealth(200); setMaxHealth(200); SetAttackRange(200); setAttackSpeed(0.25f); setAnchor(Vector2(1200,1200)); setDefense(20); setSight(500); setLevel(6); setAllAnimationsArray(); currentAnimation = allAnimations[Animation_East]; }
Bruiser::Bruiser() { setTypeID(Boss_Bruiser); chargeDamage = 30; setCurrHealth(200); setMaxHealth(200); SetAttackRange(200); setAnchor(Vector2(1200,1200)); setAttackSpeed(0.5f); setDefense(15); setSight(600); setLevel(5); setAllAnimationsArray(); currentAnimation = allAnimations[Animation_East]; }
Flame::Flame(Vector2 const &_position, Vector2 const &_velocity, int _ID, float _currHealth, int _direction) { setTypeID(Boss_Flame); setCurrHealth(_currHealth); setMaxHealth(200); setPosition(_position); setVelocity(_velocity); setDirection(_direction); setID(_ID); SetAttackRange(200); setAttackSpeed(0.25f); setDefense(20); setSight(500); setLevel(6); setAnchor(Vector2(1200,1200)); setAllAnimationsArray(); currentAnimation = allAnimations[Animation_East]; }
Bruiser::Bruiser(Vector2 const &_position, Vector2 const &_velocity, int _ID, float _currHealth, int _direction) { setTypeID(Boss_Bruiser); chargeDamage = 30; setCurrHealth(_currHealth); setMaxHealth(200); setPosition(_position); setVelocity(_velocity); setDirection(_direction); setID(_ID); SetAttackRange(200); setAnchor(Vector2(1200,1200)); setAttackSpeed(0.5f); setDefense(15); setSight(600); setLevel(5); setAllAnimationsArray(); currentAnimation = allAnimations[Animation_East]; }
void WeaponObjectImplementation::updateCraftingValues(CraftingValues* values, bool firstUpdate) { /* * Incoming Values: Ranges: * mindamage Differs between weapons * maxdamage * attackspeed * woundchance * roundsused * hitpoints * zerorangemod * maxrange * maxrangemod * midrange * midrangemod * charges * attackhealthcost * attackactioncost * attackmindcost */ float value = 0.f; setMinDamage(MAX(values->getCurrentValue("mindamage"), 0)); setMaxDamage(MAX(values->getCurrentValue("maxdamage"), 0)); setAttackSpeed(values->getCurrentValue("attackspeed")); setHealthAttackCost((int)values->getCurrentValue("attackhealthcost")); setActionAttackCost((int)values->getCurrentValue("attackactioncost")); setMindAttackCost((int)values->getCurrentValue("attackmindcost")); if (isJediWeapon()) { setForceCost((int)values->getCurrentValue("forcecost")); setBladeColor(31); } value = values->getCurrentValue("woundchance"); if(value != CraftingValues::VALUENOTFOUND) setWoundsRatio(value); //value = craftingValues->getCurrentValue("roundsused"); //if(value != DraftSchematicValuesImplementation::VALUENOTFOUND) //_this.getReferenceUnsafeStaticCast()->set_______(value); value = values->getCurrentValue("zerorangemod"); if(value != CraftingValues::VALUENOTFOUND) setPointBlankAccuracy((int)value); value = values->getCurrentValue("maxrange"); if(value != CraftingValues::VALUENOTFOUND) setMaxRange((int)value); value = values->getCurrentValue("maxrangemod"); if(value != CraftingValues::VALUENOTFOUND) setMaxRangeAccuracy((int)value); value = values->getCurrentValue("midrange"); if(value != CraftingValues::VALUENOTFOUND) setIdealRange((int)value); value = values->getCurrentValue("midrangemod"); if(value != CraftingValues::VALUENOTFOUND) setIdealAccuracy((int)value); //value = craftingValues->getCurrentValue("charges"); //if(value != CraftingValues::VALUENOTFOUND) // setUsesRemaining((int)value); value = values->getCurrentValue("hitpoints"); if(value != CraftingValues::VALUENOTFOUND) setMaxCondition((int)value); setConditionDamage(0); }