<?php
/**
* このインターフェイスを実装するクラスはバトルにエントリーできる
*
*/
interface BattleAble
{
public const HP_MIN = 0;
public const PERCENTAGE = 100;
/**
* 名前を取得
*
* @return string
*/
public function getName(): string;
/**
* HPを取得
*
* @return int
*/
public function getHp(): int;
/**
* HPを減算
*
* @param int $value
* @return void
*/
public function subHp(int $value): void;
/**
* 最大HPを取得
*
* @return int
*/
public function getHpMax(): int;
/**
* HP割合を取得
*
* @return int
*/
public function getHpRate(): int;
/**
* ATKを取得
*
* @return int
*/
public function getAtk(): int;
/**
* DEFを取得
*
* @return int
*/
public function getDef(): int;
/**
* CRIを取得
*
* @return int
*/
public function getCri(): int;
/**
* BLOCKを取得
*
* @return int
*/
public function getBlock(): int;
/**
* ステータス合計値を取得
*
* @return int
*/
public function getTotalStatus(): int;
/**
* 行動
*
* @param BattleAble $target
*/
public function action(BattleAble $target): Action;
/**
* 死亡か
*
* @return bool true:死亡, false:生存
*/
public function isDead(): bool;
/**
* 防御設定
*
* @param bool $isDefence
* @return void
*/
public function setDefence(bool $isDefence): void;
/**
* 防御中か
*
* @return bool true:防御中, false:非防御中
*/
public function isDefence(): bool;
/**
* クリティカルヒットを抽選
*
* @return bool true :クリティカルヒット, false:非クリティカルヒット
*/
public function lotteryCriticalHit(): bool;
/**
* クリティカルヒットかを設定
*
* @param bool $isCriticalHit true :クリティカルヒット, false:非クリティカルヒット
* @return void
*/
public function setCriticalHit(bool $isCriticalHit): void;
/**
* クリティカルヒットか
*
* @return bool true:クリティカルヒット, false:非クリティカルヒット
*/
public function isCriticalHit(): bool;
/**
* ブロック成功したか抽選
*
* @return bool true: ブロック成功, false: ブロック失敗
*/
public function lotteryBlockSuccess(): bool;
/**
* ブロック成功したか設定
*
* @param bool $isBlockSuccess true: ブロック成功, false:ブロック失敗
* @return void
*/
public function setBlockSuccess(bool $isBlockSuccess): void;
/**
* ブロック成功したか
*
* @return bool true: ブロック成功, false:ブロック失敗
*/
public function isBlockSuccess(): bool;
}