#include "Warrior.h" #include "GameInstance.h" #include "Core/Subsystems/GameInputSystem.h" #include "Game/Characters/Monster/Monster.h" Warrior::Warrior(PlayerStatData&& Rvalue) : Player(std::move(Rvalue)) { HitCount = 1; } Warrior::~Warrior() { } void Warrior::Initalize() { Player::Initalize(); PlayerData.Job = "전사"; int MaxDefence = Game::InitCharacterJob::AddMaxDefence; GInput << "전사로 전직하였습니다." << "(Defence +" << MaxDefence << ")" << "\n"; GInput << "파워 스트라이크 추가!\n"; PlayerData.Defence += MaxDefence; } void Warrior::Release() { Player::Release(); } void Warrior::Attack(class Monster* Target) { std::string TargetName = Target->GetName(); int TargetDefence = Target->GetDefence(); int Damage = 0; Damage = (PlayerData.Attack - TargetDefence) < 0 ? 1 : (PlayerData.Attack - TargetDefence); GInput << "파워스트라이크! -> " << TargetName << "에게 " << Damage << " 데미지!" << "\n"; GInput << Target->GetName() << " HP: " << Target->GetHP() << " -> "; Target->TakeDamage(Damage); GInput << Target->GetHP() << "\n"; system("pause"); } void Warrior::TakeDamage(int Amount) { Player::TakeDamage(Amount); }