dungeon07.lua

来自「一个symbian 冒险游戏代码」· LUA 代码 · 共 38 行

LUA
38
字号
loadMappy( "dungeon_room_07.pms", "dungeon_in.tga" )
setStartBlock( 7, 6 )

addScreenTrigger( "", 7, 6, "demon_lair" )

addSpecialTrigger( "gamefinish", "SignalGameFinish", -1, -1, "finish", 0 )
setTriggerByObjectState( "FinalEnemy", "DEAD", "gamefinish" )

-- potion of health
addCharStateTrigger( "health1", 4, 24, "DRINK" )
addSpecialTrigger( "health1", "MaximizeHealth", 4, 24, "", 0 )
addSpriteTrigger( "health1", 4, 24, "potionofhealth" )
addTextTrigger( "health1", 4, 24, "You find a health potion.", 3 )
addEnableTrigger( "health1", 4, 24, "health1", 0 )

-- potion of health
addCharStateTrigger( "health2", 13, 24, "DRINK" )
addSpecialTrigger( "health2", "MaximizeHealth", 13, 24, "", 0 )
addSpriteTrigger( "health2", 13, 24, "potionofhealth" )
addTextTrigger( "health2", 13, 24, "You find a health potion.", 3 )
addEnableTrigger( "health2", 13, 24, "health2", 0 )

-- addEnemy( name, blockx, blocky, angle, TYPE, hitpoints, speed, attackdamage, attackskill, aggression, cowardness )
addEnemy( "FinalEnemy", 8, 19, 270, "HELLBEAST", 150, 125, 50, 50, 255, 0 )
addEnemy( "", 5, 20, 315, "OGRE", 50, 60, 10, 40, 150, 0 )
addEnemy( "", 12, 20, 225, "OGRE", 50, 60, 10, 40, 150, 0 )

addTextTrigger( "hole1", 7, 6, "You drop and smell sulphur.", 3 )
addSpecialTrigger( "hole1", "Sound", 7, 6, "enemy_laugh", 0 )
addTextTrigger( "hole2", 7, 8, "Hot air whirls\naround you.", 3 )
addTextTrigger( "hole3", 7, 10, "It is time.", 3 )
addEnableTrigger( "hole1", 7, 6, "hole1", 0 )
addEnableTrigger( "hole2", 7, 8, "hole2", 0 )
addEnableTrigger( "hole3", 7, 10, "hole3", 0 )

-- initally disabled
disableTrigger( "gamefinish" )

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?