Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combat flags for instances #3452

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Renamed flags
  • Loading branch information
AdamPlenty committed Sep 7, 2024
commit 47a1a02c6f9b1d4eaac2fcca2f256ed809fc3cfe
6 changes: 3 additions & 3 deletions src/config_creature.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ const struct NamedCommand creaturetype_instance_properties[] = {
{"QUICK", InstPF_Quick},
{"DISARMING", InstPF_Disarming},
{"DISPLAY_SWIPE", InstPF_UsesSwipe},
{"DOOR_COMBAT", InstPF_AgainstDoor},
{"OBJECT_COMBAT", InstPF_AgainstObject},
{"WHEN_IDLE", InstPF_WhenIdle},
{"BUFF_DOOR", InstPF_DoorBuff},
{"BUFF_OBJECT", InstPF_ObjectBuff},
{"BUFF_IDLE", InstPF_IdleBuff},
{NULL, 0},
};

Expand Down
6 changes: 3 additions & 3 deletions src/config_creature.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ enum InstancePropertiesFlags {
InstPF_Quick = 0x0080,
InstPF_Disarming = 0x0100,
InstPF_UsesSwipe = 0x0200,
InstPF_AgainstDoor = 0x0400,
InstPF_AgainstObject = 0x08000,
InstPF_WhenIdle = 0x01000,
InstPF_DoorBuff = 0x0400,
InstPF_ObjectBuff = 0x08000,
InstPF_IdleBuff = 0x01000,
};

enum CreatureDeathKind {
Expand Down
6 changes: 3 additions & 3 deletions src/creature_states_combt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1945,7 +1945,7 @@ CrInstance get_object_combat_self_spell_casting(const struct Thing *creatng)
for (int i = 0; i < game.conf.crtr_conf.instances_count; i++)
{
struct InstanceInfo* inst_inf = creature_instance_info_get(i);
if (flag_is_set(inst_inf->flags, (InstPF_SelfBuff|InstPF_AgainstObject)))
if (flag_is_set(inst_inf->flags, (InstPF_SelfBuff|InstPF_ObjectBuff)))
{
if (!creature_affected_by_spell(creatng, inst_inf->func_params[1]))
{
Expand All @@ -1961,7 +1961,7 @@ CrInstance get_door_combat_self_spell_casting(const struct Thing *creatng)
for (int i = 0; i < game.conf.crtr_conf.instances_count; i++)
{
struct InstanceInfo* inst_inf = creature_instance_info_get(i);
if (flag_is_set(inst_inf->flags, (InstPF_SelfBuff|InstPF_AgainstDoor)))
if (flag_is_set(inst_inf->flags, (InstPF_SelfBuff|InstPF_DoorBuff)))
{
if (!creature_affected_by_spell(creatng, inst_inf->func_params[1]))
{
Expand All @@ -1977,7 +1977,7 @@ CrInstance get_idle_self_spell_casting(const struct Thing *creatng)
for (int i = 0; i < game.conf.crtr_conf.instances_count; i++)
{
struct InstanceInfo* inst_inf = creature_instance_info_get(i);
if (flag_is_set(inst_inf->flags, (InstPF_SelfBuff|InstPF_WhenIdle)))
if (flag_is_set(inst_inf->flags, (InstPF_SelfBuff|InstPF_IdleBuff)))
{
if (!creature_affected_by_spell(creatng, inst_inf->func_params[1]))
{
Expand Down