<object name="player">
<attr name="condition" type="string">human</attr>
// or it's shortened syntax version (for String Attributes only):
// <condition>human</condition>
</object><object name="player">
<attr name="condition" type="string">human</attr>
<attr name="statusattributes" type="simplestringdictionary">health = Health: !; condition = Condition: !</attr>
</object><object name="player">
<attr name="condition" type="string">human</attr>
<attr name="statusattributes" type="simplestringdictionary">health = Health: !; condition = Condition: !</attr>
<attr name="changedhealth" type="script">
<![CDATA[
if (player.health <= 0 and player.condition <> "zombie") {
player.condition = "zombie"
}
]]>
</attr>
</object>paste your game code here<!--Saved by Quest 5.6.5832.26793-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Apocalypse">
<gameid>22a11c32-3773-4e03-9c85-88d59fec567e</gameid>
<version>1.0</version>
<firstpublished>2016</firstpublished>
<author>Patrik Siljestam</author>
<menufont>Georgia, serif</menufont>
<gridmap />
<showhealth />
<feature_limitinventory />
<feature_lightdark />
<enablehyperlinks type="boolean">false</enablehyperlinks>
<defaultbackground>White</defaultbackground>
<defaultforeground>Black</defaultforeground>
<povstatusattributes type="stringdictionary">
<item>
<key>Condition</key>
<value>Human</value>
</item>
<item>
<key>Ammo</key>
<value>!</value>
</item>
</povstatusattributes>
<pov type="object">Survivor</pov>
<start type="script">
</start>
<onhealthzero type="script">
SetObjectFlagOn (Survivor, "Zombie")
msg ("You have become a Zombie!")
player.Condition = "Zombie"
</onhealthzero>
</game>
<object name="Town Square">
<inherit name="editor_room" />
<attr name="grid_width" type="int">3</attr>
<attr name="grid_length" type="int">3</attr>
<object name="Survivor">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="female" />
<drop type="boolean">false</drop>
</object>
<exit alias="east" to="Gas Station">
<inherit name="eastdirection" />
</exit>
<exit alias="southwest" to="Theatre">
<inherit name="southwestdirection" />
</exit>
<exit alias="north" to="Hospital">
<inherit name="northdirection" />
</exit>
</object>
<object name="Gas Station">
<inherit name="editor_room" />
<enter type="script">
Survivor.Ammo = Survivor.Ammo+6
</enter>
<exit alias="west" to="Town Square">
<inherit name="westdirection" />
</exit>
<object name="Flashlight">
<inherit name="editor_object" />
<take />
<feature_lightdark />
<attr name="feature_switchable" type="boolean">false</attr>
<lightstrength>strong</lightstrength>
<lightsource />
<displayverbs type="stringlist">
<value>Take</value>
</displayverbs>
<inventoryverbs type="stringlist">
<value>Drop</value>
</inventoryverbs>
</object>
</object>
<object name="Theatre">
<inherit name="editor_room" />
<dark />
<darkroomdescription>The Theatre is dark.</darkroomdescription>
<onexit type="script">
if (GetBoolean(Survivor, "Zombie")) {
}
else if (not GetBoolean(ZombieThea, "Dead")) {
msg ("Zombie attack!")
DecreaseHealth (50)
RemoveObject (ZombieThea)
SetObjectFlagOn (ZombieThea, "Dead")
}
</onexit>
<exit alias="northeast" to="Town Square">
<inherit name="northeastdirection" />
<lightsource />
<lightstrength>weak</lightstrength>
<runscript type="boolean">false</runscript>
</exit>
<object name="Revolver">
<inherit name="editor_object" />
<inherit name="container_limited" />
<visible />
<take />
<attr name="feature_usegive" type="boolean">false</attr>
<displayverbs type="stringlist">
<value>Take</value>
</displayverbs>
<inventoryverbs type="stringlist">
<value>Drop</value>
</inventoryverbs>
<attr name="feature_container" type="boolean">false</attr>
<open type="boolean">false</open>
<maxobjects type="int">12</maxobjects>
<close type="boolean">false</close>
</object>
<object name="ZombieThea">
<inherit name="editor_object" />
<alias>Zombie</alias>
<displayverbs type="stringlist">
<value>Fight</value>
<value>Shoot</value>
</displayverbs>
<take type="boolean">false</take>
<fight type="script">
DecreaseHealth (50)
RemoveObject (ZombieThea)
SetObjectFlagOn (ZombieThea, "Dead")
</fight>
<shoot type="scriptdictionary">
<item key="Pistol">
RemoveObject (ZombieThea)
SetObjectFlagOn (ZombieThea, "Dead")
</item>
</shoot>
</object>
</object>
<object name="Hospital">
<inherit name="editor_room" />
<dark />
<darkroomdescription>The Hospital is dark.</darkroomdescription>
<attr name="grid_width" type="int">2</attr>
<attr name="grid_length" type="int">2</attr>
<onexit type="script">
if (not GetBoolean(ZombieHosp, "Dead")) {
msg ("Zombie attack!")
DecreaseHealth (50)
RemoveObject (ZombieHosp)
SetObjectFlagOn (ZombieHosp, "Dead")
}
</onexit>
<exit alias="south" to="Town Square">
<inherit name="southdirection" />
<lightsource />
<lightstrength>weak</lightstrength>
</exit>
<exit alias="down" to="Hospital Basement">
<inherit name="downdirection" />
</exit>
<object name="ZombieHosp">
<inherit name="editor_object" />
<alias>Zombie</alias>
<displayverbs type="stringlist">
<value>Fight</value>
<value>Shoot</value>
</displayverbs>
<fight type="script">
DecreaseHealth (50)
RemoveObject (ZombieHosp)
SetObjectFlagOn (ZombieHosp, "Dead")
</fight>
<shoot type="scriptdictionary">
<item key="Pistol">
RemoveObject (ZombieHosp)
SetObjectFlagOn (ZombieHosp, "Dead")
</item>
</shoot>
</object>
</object>
<object name="Hospital Basement">
<inherit name="editor_room" />
<dark />
<onexit type="script">
if (not GetBoolean(ZombieHospBase, "Dead")) {
SetObjectFlagOn (ZombieHospBase, "Dead")
msg ("Zombie attack!")
DecreaseHealth (50)
RemoveObject (ZombieHospBase)
}
</onexit>
<object name="ZombieHospBase">
<inherit name="editor_object" />
<inherit name="male" />
<displayverbs type="stringlist">
<value>Fight</value>
<value>Shoot</value>
</displayverbs>
<attr name="feature_lightdark" type="boolean">false</attr>
<lightstrength>weak</lightstrength>
<attr name="feature_switchable" type="boolean">false</attr>
<alias>Zombie</alias>
<fight type="script">
DecreaseHealth (50)
RemoveObject (ZombieHospBase)
SetObjectFlagOn (ZombieHospBase, "Dead")
</fight>
<shoot type="scriptdictionary">
<item key="Pistol">
RemoveObject (ZombieHospBase)
SetObjectFlagOn (ZombieHospBase, "Dead")
</item>
</shoot>
</object>
<exit alias="up" to="Hospital">
<inherit name="updirection" />
</exit>
</object>
<verb>
<property>fight</property>
<pattern>fight</pattern>
<defaultexpression>"You can't fight " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>shoot</property>
<pattern>shoot</pattern>
<defaultexpression>"You can't shoot " + object.article + "."</defaultexpression>
</verb>
<object name="ZombiePlay">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="female" />
<alias>Zombie</alias>
<feature_player />
</object>
</asl>