+- +-

+-User

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

+-Stats

Members
Total Members: 139
Latest: Lex Luthor
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 77
Total Topics: 43
Most Online Today: 4
Most Online Ever: 1888
(December 24, 2023, 12:48:40 am)
Users Online
Members: 0
Guests: 3
Total: 3

Author Topic: Weapon special: curse (with example unit)  (Read 758 times)

zwclose7

  • Administrator
  • Full Member
  • *****
  • Posts: 155
  • I love anime and science!
    • View Profile
    • My blog

  • Total Badges: 24
    Badges: (View All)
    Sixth year Anniversary Fifth year Anniversary Fourth year Anniversary
Weapon special: curse (with example unit)
« on: March 05, 2017, 12:51:25 am »
Description: This attack reduces an enemy's HP by half on its next turn.



Code

Code: [Select]
#define WEAPON_SPECIAL_CURSE
[dummy]
id=curse
name="curse"
description="This attack reduces an enemy's HP by half on its next turn."
[/dummy]

[/specials]
[/attack]

[event]
name=attacker hits
first_time_only=no

[filter_attack]
special=curse
[/filter_attack]

[filter_second]
[not]
[filter_wml]
[status]
cursed=yes
[/status]
[/filter_wml]
[/not]
[/filter_second]

{VARIABLE second_unit.status.cursed yes}

[unstore_unit]
variable=second_unit
text="cursed"
{COLOR_HARM}
[/unstore_unit]

[unit_overlay]
x=$x2
y=$y2
image=curse.png
[/unit_overlay]
[/event]

[event]
name=defender hits
first_time_only=no

[filter_second_attack]
special=curse
[/filter_second_attack]

[filter]
[not]
[filter_wml]
[status]
cursed=yes
[/status]
[/filter_wml]
[/not]
[/filter]

{VARIABLE unit.status.cursed yes}

[unstore_unit]
variable=unit
text="cursed"
{COLOR_HARM}
[/unstore_unit]

[unit_overlay]
x=$x1
y=$y1
image=curse.png
[/unit_overlay]
[/event]

[event]
name=side turn
first_time_only=no

[store_unit]
[filter]
side=$side_number

[filter_wml]
[status]
cursed=yes
[/status]
[/filter_wml]
[/filter]

variable=cursed_units
[/store_unit]

{FOREACH cursed_units i}
{VARIABLE_OP cursed_units[$i].hitpoints divide 2}
{CLEAR_VARIABLE cursed_units[$i].status.cursed}

[scroll_to_unit]
x=$cursed_units[$i].x
y=$cursed_units[$i].y
[/scroll_to_unit]

[unstore_unit]
variable=cursed_units[$i]
text="curse"
{COLOR_HARM}
[/unstore_unit]

[remove_unit_overlay]
x=$cursed_units[$i].x
y=$cursed_units[$i].y
image=curse.png
[/remove_unit_overlay]

[sound]
name=wail-sml.wav
[/sound]

[delay]
time=300
[/delay]
{NEXT i}

{CLEAR_VARIABLE cursed_units}
[/event]

[+attack]
[+specials]
#enddef

#define SPECIAL_NOTES_CURSE
" This unit is able to curse its enemies, reducing their HP by half on their next turn."#enddef

Example unit

Code: [Select]
[unit_type]
[base_unit]
id=Saurian Oracle
[/base_unit]

id=Saurian Shaman
name="Saurian Shaman"
level=3
experience=150
hitpoints=48
cost=54
usage=mixed fighter
description="Saurian Shamans are the leaders of the Saurian race. They can curse the enemies to drain their health. This can quickly kill the even strongest enemy."+{SPECIAL_NOTES}+{SPECIAL_NOTES_LEADERSHIP}+{SPECIAL_NOTES_MAGICAL}+{SPECIAL_NOTES_HEALS}+{SPECIAL_NOTES_CURSE}

#Saurian Shaman have higher resistance to fire and cold damage due to their magical powers

[resistance]
fire=100
cold=100
[/resistance]

[abilities]
{ABILITY_LEADERSHIP_LEVEL_3}
[/abilities]

[attack]
damage=8
number=3
[/attack]

[attack]
damage=10
number=5

[specials]
{WEAPON_SPECIAL_CURSE}
[/specials]
[/attack]
[/unit_type]

 

+-Recent Topics

Train Station 2 Mod APk by Lex Luthor
September 14, 2023, 08:05:17 pm

Poison of the Day by zwclose7
March 16, 2020, 06:45:08 pm

The properties of GP nerve agent by xchg
October 19, 2018, 07:40:57 pm

A new route of synthesis for G-series agents by Basquyatti
October 15, 2018, 06:12:57 am

Synthesis of Methylisobutylcarbinylsarin (GH) by APC process by Basquyatti
October 14, 2018, 07:55:33 am

Synthesis conventional of Sarin by Basquyatti
October 02, 2018, 07:57:32 am

Reaction CX-7 (Experimental) by zwclose7
October 02, 2018, 12:46:47 am

The military preparation of FTH by Basquyatti
October 01, 2018, 10:15:39 pm

My chemistry videos by zwclose7
April 15, 2018, 06:05:45 pm

new way to download anime (XDCC) by saikyouzero21
April 03, 2018, 09:54:29 pm