|
|
00108118
Tavern Dweller
|
posted November 22, 2003 05:17 PM |
|
|
erm puzzle
hello,I want to add some damage to monster on battlefield of stack number from 0 to 41,
but there seems no way to do that,who can please tell me how i can do that?
thank you
____________
|
|
fnord
Promising
Famous Hero
|
posted November 22, 2003 10:57 PM |
|
|
Quote: hello,I want to add some damage to monster on battlefield of stack number from 0 to 41,
but there seems no way to do that,who can please tell me how i can do that?
thank you
You're right, there's no way currently to easily change the damage done by monsters on the stack level aside from changing their attack value.
This means that in order to do it you would need to:
a) store the damage values done by all monsters of each type on the battlefield (using the MA receiver), then change this value, and restore it after the combat;
or
b) use BG triggers to add add damage to a stack after each attack made by any monster (using BM:L or BM:K applied to the target). This can get pretty complicated, however and may not give you the results you want anyway.
____________
|
|
00108118
Tavern Dweller
|
posted November 23, 2003 06:07 AM |
|
|
b) use BG triggers to add add damage to a stack after each attack made by any monster (using BM:L or BM:K applied to the target). This can get pretty complicated, however and may not give you the results you want anyway.
thank you for your reply,I have tried your advice b,
!?BG;
!!BG:A?v810;
!!VRv811:S0;
!!VRv811&v810=6:S1;
!!VRv811&v810=7:S1;
!!BG&v811=1:E?v812; victim stack number
!!BG:N?v813; attacker stack number
!!BMv813:T?v814;
!!MA:Mv814/?v815; damage
!!MA:Av814/?v816; attack
!!BMv812:T?v817;
!!MAv817/?v818; defence
!!VRv816:-v818;
!!VRv816:*3;
!!BMv813:N?v819;
!!VRv816:+100;
!!VRv816::100;
!!VRv816:*v819;
!!VRv816:*v815;
!!BMv812&v811=1:Kdv819;
as you said,I got a unpredicted result... maybe there is something wrong in my script.
once more,thank you for you reply!
____________
|
|
fnord
Promising
Famous Hero
|
posted November 23, 2003 06:47 AM |
|
|
Quote:
as you said,I got a unpredicted result... maybe there is something wrong in my script.
once more,thank you for you reply!
You're welcome. If I'm reading your script correctly, what it does is:
1. Take the minimum damage the attacking creature does;
2. Take the difference between unmodified attack of attack and defense of defender (i.e., doesn't include the Hero bonus or spells, etc.) and multiply it by 3;
3. Add 100 to the difference (times 3) calculated in 2 and then divide by 100, which means that you'll usually get a number equal to 0 or 1. To get 2, you would need to have a base difference between attack and defense of 34 or more;
4. Take the number calculated in 3 and multiply it by the current number of creatures in the attacking stack;
5. Take the number calculated in 4 and multiply it by the minimum damage the creature does;
6. Apply this damage to the target creature using the BM:K command with the d syntax. I'm not certain if the d syntax works correctly here as I think this may be additional damage only, but I could be mistaken.
If all this is correct then it looks like your script should work (although I'm not sure about the d parameter), but combat scripting is a somewhat unpredictable business in places.
What I can tell you is that 3.58 will add some additional combat scripting triggers and receivers. One of them is a trigger for when a stack takes physical damage and another is a receiver that lets you modify this damage. So if you're unable to get your script to do what you want now, the new commands should let you do it when 3.58 is (eventually) ready.
____________
|
|
00108118
Tavern Dweller
|
posted November 24, 2003 07:22 AM |
|
|
Quote:
as you said,I got a unpredicted result... maybe there is something wrong in my script.
once more,thank you for you reply!
You're welcome. If I'm reading your script correctly, what it does is:
1. Take the minimum damage the attacking creature does;
2. Take the difference between unmodified attack of attack and defense of defender (i.e., doesn't include the Hero bonus or spells, etc.) and multiply it by 3;
3. Add 100 to the difference (times 3) calculated in 2 and then divide by 100, which means that you'll usually get a number equal to 0 or 1. To get 2, you would need to have a base difference between attack and defense of 34 or more;
4. Take the number calculated in 3 and multiply it by the current number of creatures in the attacking stack;
5. Take the number calculated in 4 and multiply it by the minimum damage the creature does;
6. Apply this damage to the target creature using the BM:K command with the d syntax. I'm not certain if the d syntax works correctly here as I think this may be additional damage only, but I could be mistaken.
If all this is correct then it looks like your script should work (although I'm not sure about the d parameter), but combat scripting is a somewhat unpredictable business in places.
yes,what you said is exactly what I want to implement,though that formula looks somewhat foolish
Quote:
What I can tell you is that 3.58 will add some additional combat scripting triggers and receivers. One of them is a trigger for when a stack takes physical damage and another is a receiver that lets you modify this damage. So if you're unable to get your script to do what you want now, the new commands should let you do it when 3.58 is (eventually) ready.
oh,it is so wonderful,I am looking forward to 3.58 very much
and it seems that i have to postpone my plan until releasing of 3.58
in the end please accept my thank
|
|
fnord
Promising
Famous Hero
|
posted November 24, 2003 08:43 AM |
|
|
Quote:
oh,it is so wonderful,I am looking forward to 3.58 very much
and it seems that i have to postpone my plan until releasing of 3.58
in the end please accept my thank
You're welcome. There's quite a lot of new ERM commands that will be in 3.58. Of course, there will always be more commands than haven't been made (yet), but many of the new ones are quite interesting and useful.
____________
|
|
Greek_god_su...
Famous Hero
Bringer Of Light
|
posted December 07, 2003 06:18 PM |
|
|
Is there some easy way (=without too much scripting) to add special abilities like unlimited retaliations, drain life, strike and return attack, attack to three squares (cerberus), petrifyings, immunities, spellcastings etc. to other creatures??
Could these options be added somehow to erm script master, cause I have very little knowledge of scripting those myself with script editor.
|
|
|
|