+- +-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Stats

Members
Total Members: 129
Latest: dilpreetkaur
New This Month: 1
New This Week: 1
New Today: 0
Stats
Total Posts: 319
Total Topics: 160
Most Online Today: 2
Most Online Ever: 68
(October 18, 2019, 12:38:07 am)
Users Online
Members: 0
Guests: 2
Total: 2

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

zwclose7

  • Administrator
  • Full Member
  • *****
  • Posts: 155
  • I love anime and science!
    • View Profile
    • My blog
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.

https://www.youtube.com/watch?v=qxqdd31PXIc

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

Independent Call Girls in Chandigarh by dilpreetkaur
June 21, 2021, 01:02:52 pm

Hi zwclose7. How to create process by using NT apis? by zwclose7
June 01, 2021, 03:09:52 pm

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

IRC by AzeS
February 17, 2020, 08:18:01 am

Native API tutorial by hMihaiDavid
January 08, 2019, 02:11:02 am

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