Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: Script: armageddon reduces HP limit
Thread: Script: armageddon reduces HP limit
XEricSin
XEricSin


Famous Hero
posted September 08, 2016 07:39 PM

Script: armageddon reduces HP limit

My friend wanted to apply AOE damage to every troop in a stack.
So I made this script for armageddon.

ZVSE
**use FU29460 and z900

!?FU29460; = MR:N;
!!UN:C42231940/4/?y1;
!!UN:C6919200/4/?y2;
!!VRx1:Sy1 -y2 -21708 :1352;

!#SS26:C0/100 C1/100 C2/90 C3/80;
!#VRz900:S^{Armageddon!!!}

Rains fire down upon the battlefield, damaging all units.

A reduction in stack's HP will be applied instead of the actual damage.
Reduction = Damage / 10
^;
!#SS260/z900 D1/z900 D2/z900 D3/z900;

!?MR1;
!!MR:S?y1;
!!FU&y1<>26:E;  end if not armagedon
*set hp limit reduction
!!MR:F?y1;
!!VRy1::10;
*get stack number
!!FU29460?y2;
*check stack info
!!BMy2:H?y3 L?y4 N?y5;
*if reduction less than hp limit then reduce limit and check the remaining hp limit and the hp of first creature, prevent damage
!!if&y1<y3:;
 !!VRy5:Sy1 *-1;
 !!BMy2:Hdy5;      decrease hp limit
 !!BMy2&y4<y1:L0;    set loss to 0
 !!BMy2&y4>=y1:Ldy5;    reduce hp loss by the same amount
 !!MR:F0;
!!el:;
*if reduction more than limit then apply limit*number damage
 !!VRy5:*y3;
 !!MR:Fy5;
!!en:;

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
Baronus


Legendary Hero
posted September 10, 2016 09:52 PM

Modding spell effects is very interesting thing. It is usefull for mods. Thanks.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0234 seconds