Session::Session(unsigned int id, std::string tulpa_name, int session_type_id, std::string description, int duration, std::string date) { setID(id); setTypeID(session_type_id); setTulpaName(tulpa_name); setDescription(description); setDuration(duration); setDate(date); }
void Session::loadFromJSON() { setID(root["id"].asInt()); setTypeID(root["id_action"].asInt()); setTulpaName(root["tulpa_name"].asString()); setDescription(root["description"].asString()); setDuration(root["duration"].asInt()); setDate(root["date"].asString()); setWritingLog(root["writing_log"].asString()); }
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]; }
Fire::Fire(int _typeID,Entity* _owner,unsigned int _uniqueId) { setOwner(_owner); setWorldPos(getOwner()->getPosition()); setUniqueID(_uniqueId); setWorldPos(_owner->getPosition()); setVelocity(Vector2(300,300)); setTypeID(_typeID); setDestoryed(false); if(_owner->getTypeID() == Player_User) { switch(_owner->returnDirection()) { case Attack_Animation_East: setVelocity(Vector2(300,0)); break; case Attack_Animation_West: setVelocity(Vector2(-300,0)); break; case Attack_Animation_North: setVelocity(Vector2(0,-300)); break; case Attack_Animation_South: setVelocity(Vector2(0,300)); break; case Attack_Animation_NorthWest: setVelocity(Vector2(-300,-300)); break; case Attack_Animation_NorthEast: setVelocity(Vector2(300,-300)); break; case Attack_Animation_SouthWest: setVelocity(Vector2(-300,300)); break; case Attack_Animation_SouthEast: setVelocity(Vector2(300,300)); break; } } if(_typeID == Spell_Fireball) { setDamage(5); setDamageOverTime(1); setDamageTime(3); setAOEDamage(0); setAOERange(0); setManaCost(2); setRange(800); setCollsionRect(Rect2(getWorldPos().X,getWorldPos().Y,32,32)); #ifdef CLIENT Emitter * spellTemp = new Emitter(*Emitter::emittersBluePrint[Particle_Fireball]); setSpellEffect(spellTemp); #endif } else if(_typeID == Spell_Phoenix) { setDamage(8); setDamageOverTime(1); setDamageTime(5); setAOEDamage(3); setAOERange(100); setManaCost(4); setRange(800); setCollsionRect(Rect2(getWorldPos().X-16,getWorldPos().Y-16,32,32)); #ifdef CLIENT Emitter * spellTemp = new Emitter(*Emitter::emittersBluePrint[Particle_FireDestroyed]); setSpellEffect(spellTemp); #endif } else if(_typeID == Spell_Diablo) { setDamage(12); setDamageOverTime(2); setDamageTime(5); setAOEDamage(7); setAOERange(200); setManaCost(8); setRange(800); setLevel(3); setCollsionRect(Rect2(getWorldPos().X-32,getWorldPos().Y-32,64,64)); #ifdef CLIENT Emitter * spellTemp = new Emitter(*Emitter::emittersBluePrint[Particle_FireDestroyed]); setSpellEffect(spellTemp); #endif } }