-
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
Improve and fix ranged buffs #3499
Conversation
Improve validate_target_generic() to exclude the creatures that have been affected by the spell, so that this function could be used for all persisting spell, such as SPEED, ARMOUR. Type: New Feature
This is so cool! However balance-wise this is incredibly OP. Range speed to anything level 10, if you have a bunch of them it can buff your entire army very quickly and for free. Maybe we want to tweak the configuration a bit? Ultimately it's up to the mapmakers sure but coming up with a sensible default won't hurt I think. |
For now, we can nerf it by increasing their reset time (cooldown time). |
I know a similar change where spiders would only freeze units that weren't already frozen made said spiders 1 of the best units in game, instead of the garbage without, so yeah do need to take balance into account with a check like that |
other buffs have this available too though. |
self buffs rely on cooldown, buffing other units you can have multiple buff same unit, but yeah I guess many units are basically permanently buffed with self buffs as well |
The program will crash when there are 3+ creatures being included in the result list of search_target_generic(). The reason is unclear. It seems that C has special rules for double star (**) type. It will corrupt the memory when access *pp[i] if i >= 2 even if *pp was created by malloc() with enough space. For exmaple: void fooint( int **pp ) { *pp = malloc(100); *pp[2] = 9; //crash. // It must be rewritten in: int *p2 = malloc(100); p2[2] = 9; // ok. *pp = p2; } Type: Bug Fix
* Unconscious creature can't be the target. * Creature being tortured or kept in prison can't be source, except for Ranged Heal. * Creature being tortured or kept in prison can only heal itself. Type: New Feature
Sometimes, the ranged buffs is cast on hostile targets because the ranged buff is mistakenly treated as "weapon" in get_best_ranged_offensive_weapon() and get_best_melee_offensive_weapon(const(). Besides, this fix the bug that ranged heal's shot object is fired toward the hostile. It is because the target's index isn't set to the caster when casting a self buff. For example: set_creature_instance(thing, inst_id, 0, 0); // Wrong. set_creature_instance(thing, inst_id, thing->index, 0); // Correct. The 3rd parameter must be the caster's index for a self buff. Type: Bug Fix
dc37145
to
d954b24
Compare
If our creatures are imprisoned, it's not reasonable to cast buffs on them because they are not valid to fight. But heal is allowed because imprisoned creatures will starve to death unless they get healed. If our creatures break enemy's defense and reach the prison, we should allow our ranged healers to save their allies from death. Type: New Feature
Currently, the ranged buffs are allowed to fire at nothing. A SHOT will be fired and it may hit something that we don't want, for example, unconscious creatures. This is a waste. The change prevents it. Now unless the player aim at a valid creature, the ranged buff won't be used. This change won't affect debuffs or ranged attacks. Type: Bug Fix
Forbid Ranged Heal to be cast on imprisoned allies per YourMaster's request to maintain consistency. Also adjust the reset time of the new ranged buffs. Now they have the same number as the self buff. Type: New Feature
In the commit cc405a7, we added the restriction of casting on imprisoned allies for the creatures, but we didn't address this issue in Possession mode. This improves the target selection logic in Possession mode. Type: Bug Fix
This PR contains several bugfixes and improvements.
Type: New Feature