Unpetrify issue

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Unpetrify issue

Post by Gwledig »

Hi I have an [unpetrify] in a general healing ability, I suspect 114 has done something to stop the unpetrify working.. can anyone see a problem using unpetrify in this way please?

Code: Select all

#define ABILITY_HEALER
# included in an [abilities] clause
#summon ability relies on summon magus code
[heals]
value=25
id=morehealing
affect_allies=yes
affect_self=no
cumulative=yes
poison=cured
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[/heals]
[unpetrify][/unpetrify]
[dummy]
name="Healing"
description="Healing - the magus can heal by 25 hp, cure and unpetrify adjacent allies."
[/dummy]
#enddef
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
Ravana
Forum Moderator
Posts: 3004
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Unpetrify issue

Post by Ravana »

[unpetrify] as dummy ability needs id to be useful.
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Unpetrify issue

Post by Gwledig »

Well from various threads it looks like [unpetrify] doesn't work as an ability and there are a few examples where event is used to set the unit status on adjacent instead of an ability, I have got the below working, but can't seem to restrict the unpetrify to friendly units only, eg an ememy wizard can unpetrify enamy units by standing next to them...

Code: Select all

#define UNPETRIFYFIX
	[event]
		name=turn refresh
		first_time_only=no
		[modify_unit]
		
	
			[filter]
			
#only allow unpetrify own side unit
[store_unit]	 
[filter_side]
side=$side_number
[/filter_side]

			
				[filter_adjacent]
					role=Magus
				[/filter_adjacent]
				adjacent=n,ne,se,s,sw,nw
				[filter_wml]
					[status]
						petrified=yes
					[/status]
				[/filter_wml]
				
#only allow unpetrify own side unit
[/store_unit]				
			[/filter]
			

			
			[status]
				petrified=no
			[/status]
		[/modify_unit]
	[/event]
#enddef
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
Ravana
Forum Moderator
Posts: 3004
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Unpetrify issue

Post by Ravana »

You have [store_unit].
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Unpetrify issue

Post by Gwledig »

thx I'll try removing store unit, perhaps it doesnt need this & can just filter on filter_side/side= etc.
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Unpetrify issue

Post by Gwledig »

hm nopes mage can still unpetrify enemy units....

Have to try some other options...

Code: Select all

#define UNPETRIFYFIX
	[event]
		name=turn refresh
		first_time_only=no
		[modify_unit]
		
	
			[filter]
			
#only allow unpetrify own side unit
	 
[filter_side]
side=$side_number
[/filter_side]

			
				[filter_adjacent]
					role=Magus
				[/filter_adjacent]
				adjacent=n,ne,se,s,sw,nw
				[filter_wml]
					[status]
						petrified=yes
					[/status]
				[/filter_wml]
				
#only allow unpetrify own side unit
			
			[/filter]
			

			
			[status]
				petrified=no
			[/status]
		[/modify_unit]
	[/event]
#enddef
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Unpetrify issue

Post by Gwledig »

hm this doesnt work either... utterly bizzare.. something so simple

Code: Select all

#define UNPETRIFYFIX
	[event]
		name=turn refresh
		first_time_only=no
		[unpetrify]
		
[filter_adjacent]
role=Magus
adjacent=n,ne,se,s,sw,nw
[/filter_adjacent]

		
[filter_side]
side=$side_number
[/filter_side]

			
		[/unpetrify]
	[/event]
#enddef
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Unpetrify issue

Post by Gwledig »

Ok this works

Code: Select all

#define UNPETRIFYFIX
	[event]
		name=turn refresh
		first_time_only=no
		[unpetrify]
		
[filter_adjacent]
role=Magus
adjacent=n,ne,se,s,sw,nw
is_enemy=false
[/filter_adjacent]

		
			
		[/unpetrify]
	[/event]
#enddef
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
Post Reply