<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="testing game stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<attr name="alcohol_level" type="int">0</attr>
</object>
<object name="beer_object_1">
<inherit name="editor_object" />
<alias>beer</alias>
<drink type="script">
player.alcohol_level = player.alcohol_level + 10
msg ("You drink some beer, becoming more drunk.")
</drink>
<displayverbs type="simplestringlist">drink</displayverbs>
<inventoryverbs type="simplestringlist">drink</inventoryverbs>
</object>
</object>
<turnscript name="alcohol_level_global_turnscript">
<enabled />
<script><![CDATA[
if (player.alcohol_level = 100) {
msg ("You die of alcohol poisoning.")
msg ("GAME OVER")
finish
} else if (player.alcohol_level < 100 and player.alcohol_level > 50) {
msg ("You're majorly drunk.")
} else if (player.alcohol_level = 50) {
msg ("You're drunk.")
} else if (player.alcohol_level < 50 and player.alcohol_level > 0) {
msg ("You're just buzzed.")
} else if (player.alcohol_level = 0) {
msg ("You're sober.")
} else {
msg ("It's not possible to have a negative alcohol level, nor to have it over 100.")
}
]]></script>
</turnscript>
</asl>
<script><![CDATA[
if (player.alcohol_level > 100) {
msg ("You die of alcohol poisoning.")
msg ("GAME OVER")
finish
}
else if (player.alcohol_level > 60) {
msg ("You're majorly drunk.")
}
else if (player.alcohol_level > 30) {
msg ("You're drunk.")
}
else if (player.alcohol_level > 0) {
msg ("You're just buzzed.")
}
else {
msg ("You're sober.")
player.alcohol_level = 0
}
player.alcohol_level = player.alcohol_level - 1
]]></script>
<script><![CDATA[
if (player.alcohol_level > 100) {
msg ("You die of alcohol poisoning.")
msg ("GAME OVER")
finish
}
else if (player.alcohol_level > 60) {
msg ("You're majorly drunk.")
JS.eval ("$('#divOutput').css('text-shadow', '0 0 2px black,0 0 5px black,0 0 15px black')")
}
else if (player.alcohol_level > 30) {
msg ("You're drunk.")
JS.eval ("$('#divOutput').css('text-shadow', '0 0 2px black,0 0 5px black')")
}
else if (player.alcohol_level > 0) {
JS.eval ("$('#divOutput').css('text-shadow', '0 0 2px black')")
msg ("You're just buzzed.")
}
else {
msg ("You're sober.")
player.alcohol_level = 0
}
player.alcohol_level = player.alcohol_level - 1
]]></script>