-
Notifications
You must be signed in to change notification settings - Fork 77
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
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
0 to disable, add comments
7d16520
to
0542916
Compare
In the original order, with space in between to make it easy for modders to put their ability in between others
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.