Prep for the next cleaning quality cycle.
This commit is contained in:
parent
15bb69624b
commit
8368d2e751
3 changed files with 138 additions and 6 deletions
3
Makefile
3
Makefile
|
@ -22,8 +22,7 @@ tracy_build:
|
||||||
meson compile -j 10 -C builddir
|
meson compile -j 10 -C builddir
|
||||||
|
|
||||||
test: build
|
test: build
|
||||||
./builddir/runtests "[ai]"
|
./builddir/runtests
|
||||||
./builddir/runtests "[combat]"
|
|
||||||
|
|
||||||
run: build test
|
run: build test
|
||||||
powershell "cp ./builddir/zedcaster.exe ."
|
powershell "cp ./builddir/zedcaster.exe ."
|
||||||
|
|
|
@ -109,14 +109,11 @@ bool Autowalker::path_player(Pathing& paths, Point& target_out) {
|
||||||
bool found = paths.random_walk(target_out, false, PATHING_TOWARD, 4, 8);
|
bool found = paths.random_walk(target_out, false, PATHING_TOWARD, 4, 8);
|
||||||
|
|
||||||
if(!found) {
|
if(!found) {
|
||||||
fmt::println("4/8 NOT FOUND");
|
|
||||||
// failed to find a linear path, try diagonal
|
// failed to find a linear path, try diagonal
|
||||||
if(!paths.random_walk(target_out, false, PATHING_TOWARD, 8, 8)) {
|
if(!paths.random_walk(target_out, false, PATHING_TOWARD, 8, 8)) {
|
||||||
path_fail(paths.$paths, target_out);
|
path_fail(paths.$paths, target_out);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
fmt::println("4/8 YES FOUND");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!fsm.$level.map->can_move(target_out)) {
|
if(!fsm.$level.map->can_move(target_out)) {
|
||||||
|
@ -222,7 +219,6 @@ void Autowalker::handle_boss_fight() {
|
||||||
void Autowalker::handle_player_walk(ai::State& start, ai::State& goal) {
|
void Autowalker::handle_player_walk(ai::State& start, ai::State& goal) {
|
||||||
start = update_state(start);
|
start = update_state(start);
|
||||||
auto a_plan = ai::plan("Walker::actions", start, goal);
|
auto a_plan = ai::plan("Walker::actions", start, goal);
|
||||||
ai::dump_script("\n\n\n-----WALKER SCRIPT", start, a_plan.script);
|
|
||||||
auto action = a_plan.script.front();
|
auto action = a_plan.script.front();
|
||||||
|
|
||||||
if(action.name == "find_enemy") {
|
if(action.name == "find_enemy") {
|
||||||
|
|
137
tests/cyclic_rituals.json
Normal file
137
tests/cyclic_rituals.json
Normal file
|
@ -0,0 +1,137 @@
|
||||||
|
{
|
||||||
|
"profile": {
|
||||||
|
"has_spikes": 0,
|
||||||
|
"has_magick": 1,
|
||||||
|
"shiny_bauble": 2,
|
||||||
|
"cursed_item": 3,
|
||||||
|
"$does_physical": 4,
|
||||||
|
"$does_magick": 5,
|
||||||
|
"$does_damage": 6,
|
||||||
|
"$user_cursed": 7,
|
||||||
|
"$does_healing": 8,
|
||||||
|
"$damage_boost": 9,
|
||||||
|
"$large_boost": 10,
|
||||||
|
"$is_complete": 11
|
||||||
|
},
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"name": "pierce_type",
|
||||||
|
"cost": 100,
|
||||||
|
"needs": {
|
||||||
|
"has_spikes": true,
|
||||||
|
"$is_complete": false
|
||||||
|
},
|
||||||
|
"effects": {
|
||||||
|
"$does_physical": true,
|
||||||
|
"$does_damage": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "magick_type",
|
||||||
|
"cost": 100,
|
||||||
|
"needs": {
|
||||||
|
"$is_complete": false,
|
||||||
|
"has_magick": true
|
||||||
|
},
|
||||||
|
"effects": {
|
||||||
|
"$does_magick": true,
|
||||||
|
"$does_damage": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "combined",
|
||||||
|
"cost": 0,
|
||||||
|
"needs": {
|
||||||
|
"$does_damage": true
|
||||||
|
},
|
||||||
|
"effects": {
|
||||||
|
"$is_complete": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "boost_magick",
|
||||||
|
"cost": 0,
|
||||||
|
"needs": {
|
||||||
|
"shiny_bauble": true,
|
||||||
|
"$does_magick": true,
|
||||||
|
"$does_damage": true,
|
||||||
|
"$is_complete": false,
|
||||||
|
"$user_cursed": false
|
||||||
|
},
|
||||||
|
"effects": {
|
||||||
|
"$damage_boost": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "boost_damage_large",
|
||||||
|
"cost": 0,
|
||||||
|
"needs": {
|
||||||
|
"cursed_item": true,
|
||||||
|
"$is_complete": false,
|
||||||
|
"$does_damage": true
|
||||||
|
},
|
||||||
|
"effects": {
|
||||||
|
"$large_boost": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "curses_user",
|
||||||
|
"cost": 0,
|
||||||
|
"needs": {
|
||||||
|
"cursed_item": true
|
||||||
|
},
|
||||||
|
"effects": {
|
||||||
|
"$user_cursed": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "heals_user",
|
||||||
|
"cost": 0,
|
||||||
|
"needs": {
|
||||||
|
"cursed_item": true,
|
||||||
|
"$does_damage": false
|
||||||
|
},
|
||||||
|
"effects": {
|
||||||
|
"$does_healing": true,
|
||||||
|
"$is_complete": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"states": {
|
||||||
|
"initial": {
|
||||||
|
"shiny_bauble": false,
|
||||||
|
"cursed_item": false,
|
||||||
|
"has_spikes": false,
|
||||||
|
"has_magick": false,
|
||||||
|
"$user_cursed": false,
|
||||||
|
"$does_damage": false,
|
||||||
|
"$is_complete": false,
|
||||||
|
"$does_healing": false,
|
||||||
|
"$does_magick": false,
|
||||||
|
"$does_physical": false,
|
||||||
|
"$large_boost": false,
|
||||||
|
"$damage_boost": false
|
||||||
|
},
|
||||||
|
"final": {
|
||||||
|
"$user_cursed": true,
|
||||||
|
"$does_damage": true,
|
||||||
|
"$is_complete": true,
|
||||||
|
"$does_healing": true,
|
||||||
|
"$does_magick": true,
|
||||||
|
"$does_physical": true,
|
||||||
|
"$large_boost": true,
|
||||||
|
"$damage_boost": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"actions": [
|
||||||
|
"boost_magick",
|
||||||
|
"pierce_type",
|
||||||
|
"magick_type",
|
||||||
|
"heals_user",
|
||||||
|
"curses_user",
|
||||||
|
"boost_damage_large",
|
||||||
|
"combined"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue