MCPcopy Create free account
hub / github.com/EasyRPG/Player / MakeEnemy

Function MakeEnemy

tests/autobattle.cpp:6–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include "doctest.h"
5
6static Game_Enemy MakeEnemy(int id, int hp, int sp, int atk, int def, int spi, int agi) {
7 MakeDBEnemy(id, hp, sp, atk, def, spi, agi);
8 auto& tp = lcf::Data::troops[0];
9 tp.members.resize(8);
10 tp.members[id - 1].enemy_id = id;
11 Main_Data::game_enemyparty->ResetBattle(1);
12 auto& enemy = (*Main_Data::game_enemyparty)[id - 1];
13 return std::move(enemy);
14}
15
16decltype(auto) MakeActor(int id, int hp, int sp, int atk, int def, int spi, int agi) {
17 auto actor = Game_Actor(id);

Callers 1

autobattle.cppFile · 0.70

Calls 2

MakeDBEnemyFunction · 0.85
ResetBattleMethod · 0.45

Tested by

no test coverage detected