-
Notifications
You must be signed in to change notification settings - Fork 76
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
Remove hardcoded quick instances #3504
base: master
Are you sure you want to change the base?
Remove hardcoded quick instances #3504
Conversation
If I'm reading correctly now warlocks would start shooting navigating missiles at imps, doesn't sound like something we'd want |
For reference this is what I did on a discontinued PR. CrInstance get_best_quick_range_instance_to_use(const struct Thing *thing)
{
struct InstanceInfo* inst_inf;
for (int p = PRIORITY_MAX; p >= 0; p--)
{
for (int i = 0; i < game.conf.crtr_conf.instances_count; i++)
{
inst_inf = creature_instance_info_get(i);
if (inst_inf->priority < p) // Instances with low priority are used last.
continue;
if (flag_is_set(inst_inf->instance_property_flags, InstPF_Quick))
{
INSTANCE_RET_IF_AVAIL(thing, i);
}
}
}
return CrInst_NULL;
} It used a priority parameter and in case of ties it's the first instance on the list the creature uses first. Shinthoras version is better in my opinion, it checks the range min/max (something I intentionnaly neglected since my reasoning was the vanilla experience don't check the range) and it adds some randomness to the mix. |
I'm not fond of the randomness part of choosing an instance, they're supposed to use something weak to scare them off so they'd leave, not intentionally murder them |
It still pick only those with the QUICK attribute, right? They are not going to use Meteor unless mapmaker give it QUICK, I think? Edit: maybe I'm missing your point entirely, that's possible too. 🤔 |
navigating missile is in the current list, but not something I'd want warlocks to use if fireball is available |
- retain original sorcerer behavior by removing the 'Quick' property from the navigation_missile instance in the default config - Cleaned up redundant code
@@ -448,7 +448,7 @@ Graphics = ATTACK | |||
RangeMin = 156 | |||
RangeMax = MAX | |||
PrimaryTarget = 3 | |||
Properties = DESTRUCTIVE QUICK RANGED_ATTACK | |||
Properties = DESTRUCTIVE RANGED_ATTACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe we just want to keep QUICK on fireball and regular missile (for wizard)? So remove from all the others instances? I don't know, just an idea.
This replaces the hardcoded selection of "QUICK" instances in the going_postal job (mad sorcerers in library) with a dynamic instance selection mechanism. This change allows modders to set their own custom "QUICK" instances.