Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Bug: cancellable combat spell vs counter magic

Anyone knows this bug??:

When an user cast a cancellable spell, under computer player's counter magic in effect, and then cancells the spell, the counter magic's dispel power is reduced by 5, even when the spell is cancelled.

A cancellable combat spell is any spell that needs a map square target (web, crack-call, all summon spells, etc..), an enemy/friendly unit target (fireball, healing, etc..). Before the user assigns the target, the spell can be cancelled.

The cause of the bug is that, the dispel happens after the user selects the spell to cast, but before the user can choose to cancel it.

Possible fix 1: (Cleanest way)
Implement the dispel AFTER the user confirms the target.

Possible fix 2: (Not preferred, causing disadvantage to the user)
give 5 points back to the strength of the counter magic spell.
This is not a good way, since, the user's spell has already suffered from been dispelled by the counter magic spell effect:
If the user wants to cancel the spell, it should work like the spell is never been cast. (And the dispel process should not be done at the first place).

Possible fix 3: (Not preferred)
Disable the cancellation U/I from the user, i.e. the user now can not cancel a spell in the middle.
Extra problem needs to be considered: Make sure the global spell won't be affected. Global spell casting may last a few turns, it must be cancellable. For example, if I have only two cities, and I tried to cast summoning circle back to my capital at the end of the previous turn. Suddenly, my 2nd city is conquered by some wizard, causing the summoning circle automatically go back to my capital. If cancel is disabled, the program will be stocked! Hit your capital to try to assign the summoning circle spell will cause a pop-up saying that your summoning circle is already there. Since I have no other city and the cancellation is diabled, It is stocked.

Scenario of exploiting this bug:
When the user has archmage and Sorcery Mastery, he can cast a combat summon many times, say phantom warrior, to try to "dis-enchant" counter magic in one turn!
The dispel resistance power of phantom warrior is 10, with archmage and Sorcery Mastery, it raised to 40. So phantom warrior's passing rate to counter magic is quite big, not to say phantom beast. The user can cast, and if it passed, cancel it, and then cast it again, and again, until counter magic fizzles (or until phantom warrior spell fizzles).
Reply

The other clean option is to only allow cancel if the dispel check has failed.
Reply

Its a widely known situation. However, i think "counter magic" is too strong spell. i prefer redesign it completely - like any countered spell lower the strength of counter magic by 1/3 of its cost(include mastery and achmage).
We need this way to conter the disbalanced effect of the conter magic. Moreover, we can use the spell "giant strength" to gain some advantage: it cost 4 mp but drain 5 mp from counter magic reserve. And chaos spell in my mod have base firebolt with cost 3. This fit thematicaly, and allow "trade mana for speed" still for the countermagic caster.

Concern to the current situation: the fix n1 is hard to do, because of lack of space in this procedure. also, it need a fix with supress magic, node aura , ets.
n3 : if we disable cancelation U/I from the user, then we drop stability of the game significaly.moreover, some situations will not clear: like targeting to the invisible units.
Reply

(May 8th, 2015, 01:30)Anthony Wrote: The other clean option is to only allow cancel if the dispel check has failed.

No. That's not fair. The cancelling UI is for user's convenience: To save something if the user wrongly click on something unexpected (due to mouse slip, etc..). The user has risked the chance not passing counter magic. The RISK has already been paid. And thus it's not fair.

Strictly speaking, it depends on how you/we perceive how spell take effects.

For example:
We may say that, a summon spell, in fact, cast in two steps: In the 1st step, i.e. the prepare step, it spends the mana, and needs to resist the counter magic spell. And then in the 2nd step, the wizard needs only a simple "LEAD" to lead the summon creature to a map square, which is cancellable, and do not need to resist the counter magic spell.
However, in this example, after the cancellation, the correct implementation is:
1. Counter magic dispel power -5 (And current implementation is correct). It's fair, since the RISK has been paid.
2. The user can not cast additional spell in this turn, since his "preparation" of the summon spell has used up the spell cast chance for this turn.

Well, ya, it's "Strictly speaking.." Yet this is not quite an urgent bug. :-)
Reply

(May 8th, 2015, 01:50)Asfex Wrote: Its a widely known situation. However, i think "counter magic" is too strong spell. i prefer redesign it completely - like any countered spell lower the strength of counter magic by 1/3 of its cost(include mastery and achmage).
We need this way to conter the disbalanced effect of the conter magic. Moreover, we can use the spell "giant strength" to gain some advantage: it cost 4 mp but drain 5 mp from counter magic reserve. And chaos spell in my mod have base firebolt with cost 3. This fit thematicaly, and allow "trade mana for speed" still for the countermagic caster.

Concern to the current situation: the fix n1 is hard to do, because of lack of space in this procedure. also, it need a fix with supress magic, node aura , ets.
n3 : if we disable cancelation U/I from the user, then we drop stability of the game significaly.moreover, some situations will not clear: like targeting to the invisible units.

Targeting to invisible unit is not a problem, nor will be immunity units (fire damage spell to fire immunity, or even the ultimate magic immunity) a problem: If it's implemented to be cancellable anytime, but the dispel effects is "AFTER" everything is decided. The user has final decision of the target unit/target map, the very last minutes when the spell is to be cast, do the dispel equation at that moment. Yet if it's the code space problem... Ya. I just said, it's not urgent. Just reporting another "WON"T FIX" bug.
Reply

(May 8th, 2015, 01:58)robinh3123 Wrote: No. That's not fair. The cancelling UI is for user's convenience: To save something if the user wrongly click on something unexpected (due to mouse slip, etc..).
If that was the case it would apply to untargeted spells as well.

Oh, another possibility: bake the logic for weakening counter magic into the logic that reduces the caster's skill and mana, instead of the dispel check. This might have a weird effect if you were to cast both counter magic and mana drain, but I can't think of a good reason to do that, and other than that it would be fine. It also lets the weakening be based on the actual cost of the spell.
Reply

(May 8th, 2015, 00:15)robinh3123 Wrote: Anyone knows this bug??:

When an user cast a cancellable spell, under computer player's counter magic in effect, and then cancells the spell, the counter magic's dispel power is reduced by 5, even when the spell is cancelled.

A cancellable combat spell is any spell that needs a map square target (web, crack-call, all summon spells, etc..), an enemy/friendly unit target (fireball, healing, etc..). Before the user assigns the target, the spell can be cancelled.

The cause of the bug is that, the dispel happens after the user selects the spell to cast, but before the user can choose to cancel it.

Possible fix 1: (Cleanest way)
Implement the dispel AFTER the user confirms the target.
It's the correct way, IMHO.
As you said, not an urgent one, but it needed to be reported. nod
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it. rolleye
Reply

(May 17th, 2015, 09:21)FrancoK Wrote:
(May 8th, 2015, 00:15)robinh3123 Wrote: Anyone knows this bug??:

When an user cast a cancellable spell, under computer player's counter magic in effect, and then cancells the spell, the counter magic's dispel power is reduced by 5, even when the spell is cancelled.

A cancellable combat spell is any spell that needs a map square target (web, crack-call, all summon spells, etc..), an enemy/friendly unit target (fireball, healing, etc..). Before the user assigns the target, the spell can be cancelled.

The cause of the bug is that, the dispel happens after the user selects the spell to cast, but before the user can choose to cancel it.

Possible fix 1: (Cleanest way)
Implement the dispel AFTER the user confirms the target.
It's the correct way, IMHO.
As you said, not an urgent one, but it needed to be reported. nod

I believe this is actually good the way it is.
You are taking risks following by doing this : If the spell you are planning to cancel is countered, you are unable to cast spells that turn.
+Counter Magic is very strong for a common anyway.

I don't think any of to listed solutions would be good.
1 would be most likely very hard to code. 2. just makes counter even stronger. 3. makes the game hang if you are trying a spell with no valid targets.

If anything, I would prefer a new effect for counter magic.

Either : counter everything, 100% chance but reduce the strength of counter magic with the cost of the countered spell (possible twice to make it more fair)
Or (I think this is better) : Counter everything that has a casting cost of Counter Magic's strength/2 automatically, and every time a spell is countered, make it weaker by the casting cost of the failed spell.
Example : 60 mana counter magic, counters every spell that costs 30 or below. When countering a spell that costs 20 mana, the strength is reduced to 40, so now it can only counter spells that cost 20 or lower.
I don't know where the code for the spell(s) are in the exe to change it, unfortunately.
Reply

(August 28th, 2015, 13:47)Seravy Wrote: ...
Either : counter everything, 100% chance but reduce the strength of counter magic with the cost of the countered spell (possible twice to make it more fair)
Or (I think this is better) : Counter everything that has a casting cost of Counter Magic's strength/2 automatically, and every time a spell is countered, make it weaker by the casting cost of the failed spell.
Example : 60 mana counter magic, counters every spell that costs 30 or below. When countering a spell that costs 20 mana, the strength is reduced to 40, so now it can only counter spells that cost 20 or lower.
I don't know where the code for the spell(s) are in the exe to change it, unfortunately.

Based on your example, Any 20-mana combat magic is a count-"counter-magic" against a 40-mana counter magic. This means I can spend less mana to cancel enemy's counter magic. This randers counter-magic a useless spell.

I would say, to reduce the power of counter-magic by 1/4 of the magic power of the spell it counters (successfully or not), or 5 points, whichever is bigger. Here, "magic power" means the nominal casting skill cost of a spell, multiplied by the bonus of either archmage (2x) and/or X-mastery (2x, where X=chaos, nature, or sorcery). For example, a conjurer + sorcery mastery + archmage wizard casting phantom warrior at 6 skill point, but the "magic power" is 40, since the nominal casting skill of phantom warrior is 10, and multiply the two "2x" bonus => 10 x 2 x 2 = 40.
Reply

(September 12th, 2015, 10:53)robinh3123 Wrote:
(August 28th, 2015, 13:47)Seravy Wrote: ...
Either : counter everything, 100% chance but reduce the strength of counter magic with the cost of the countered spell (possible twice to make it more fair)
Or (I think this is better) : Counter everything that has a casting cost of Counter Magic's strength/2 automatically, and every time a spell is countered, make it weaker by the casting cost of the failed spell.
Example : 60 mana counter magic, counters every spell that costs 30 or below. When countering a spell that costs 20 mana, the strength is reduced to 40, so now it can only counter spells that cost 20 or lower.
I don't know where the code for the spell(s) are in the exe to change it, unfortunately.

Based on your example, Any 20-mana combat magic is a count-"counter-magic" against a 40-mana counter magic. This means I can spend less mana to cancel enemy's counter magic. This randers counter-magic a useless spell.
Wrong, it would merely reduce the 40 power to 20, so now Counter Magic would only counter spells that cost 10 or fewer. But you already lost 20 skill and mana and a turn doing that. Now, a counter for 10 isn't really worth anything but imagine if the inital Counter Magic was for let's say 100 mana (yes we should adjust the maximum if changing it this way). Then it would counter, let's say a Disintegrate (50), after that it would still stop any spells below 25, but the trick is, the enemy won't see the strength left, so they wouldn't know if they need to cast another Disintegrate to be sure of success, or they can now get away with a 30 mana Possession. If the CM was for 110, their Possession would also get countered, but this way it can pass, trying to summon Phantom Warriors would still fail.
I'm not sure what to do with this spell to be honest, so I haven't touched yet in my mod. I like the original but at the same time I don't like it too, it's too random and cost-effective.

1/4 does sound better I guess, but then it would be back to being able to counter spells worth more total mana than its own cost...which means the AI with twice your skill will never let you cast a spell. Except now without the randomness it would hurt more.

Edit : I finished working on Counter Magic today.
I went with the following effect in the end :
-Only countered spells reduce the power of Counter Magic, but by a fixed 10.
-Spell can be cast for 16-80 mana.
-Chance of successful spellcasting is (100*spell cost/counter strength)%. Spells more expensive than the remaining counter pool cannot be countered, as the chance is over 100% then.
Reply



Forum Jump: