Changeset 155 for adventure

Show
Ignore:
Timestamp:
04/27/08 12:02:06 (7 months ago)
Author:
elghinn
Message:

correction de la dtd et des .xml

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • adventure/cave.xml

    r144 r155  
     1<?xml version='1.0' encoding='utf-8'?> 
    12<world node='cave' name='A mysterious dark cave' start='cave (1)'> 
    23 
  • adventure/tower/tower.xml

    r144 r155  
     1<?xml version='1.0' encoding='utf-8'?> 
    12<world node='tower' name='The great tower' start='garden (start)'> 
    23 
     
    56        and a well to the south, far away. 
    67        Type '?' for help.</description> 
    7         <go spec="south" place="garden (back)" /> 
    8         <go spec="north" place="tower (entrance)" /> 
     8        <go spec="south" place="garden (back)"/> 
     9        <go spec="north" place="tower (entrance)"/> 
    910    </place> 
    10      
     11 
    1112    <place name="garden (back)"> 
    1213        <description>You are in the garden, there is a well to the east.</description> 
    13         <go spec="east" place="well" /> 
    14         <go spec="north" place="garden (start)" /> 
    15          
     14        <go spec="east" place="well"/> 
     15        <go spec="north" place="garden (start)"/> 
     16 
    1617        <npc name="Cat" aliases='the cat, kitty'> 
     18            <on-leave> 
     19                <follow target="actor">into the tower (1)</follow> 
     20            </on-leave> 
     21 
    1722            <on-self-enter> 
    1823                <signal target="Frog">Fear</signal> 
    1924            </on-self-enter> 
    20          
     25 
     26            <presence> 
     27                <show>chat</show> 
     28                <status>A little cat</status> 
     29                <image>cat.png</image> 
     30            </presence> 
     31 
    2132            <commands> 
    2233                <command name="look at %self%"><narration target="actor"> A little cat </narration></command> 
     
    2839                <command signal="Kitty_hit:Failed"> 
    2940                    <say>/me runs away</say> 
    30                     <move /> 
     41                    <move/> 
    3142                </command> 
    3243                <command signal="Is_kitty_here"> 
     
    3445                </command> 
    3546            </commands> 
    36              
    37             <on-leave> 
    38                 <follow target="actor">into the tower (1)</follow> 
    39             </on-leave> 
    40          
    41             <presence> 
    42                 <show>chat</show> 
    43                 <status>A little cat</status> 
    44                 <image>cat.png</image> 
    45             </presence> 
    4647        </npc> 
    4748    </place> 
     
    6970        </npc> 
    7071    </place> 
    71      
     72 
    7273    <place name="tower (entrance)"> 
    7374        <description>There is a man in front of the entrance.</description> 
    7475        <go spec="south" place="garden (start)" /> 
    75          
     76 
    7677        <npc name="Guard" aliases="man, the man, the guard"> 
     78            <on-enter target="Cat"> 
     79                <say>Hello little cute cat! :)</say> 
     80                <say>/me opened the door. You can go inside</say> 
     81                <add-exit>inside:into the tower (1)</add-exit> 
     82            </on-enter> 
     83 
     84            <on-leave target="Cat"> 
     85                <say>Goodbye little Cat!</say> 
     86                <say>/me closed the door</say> 
     87                <del-exit>inside</del-exit> 
     88            </on-leave> 
     89 
    7790            <presence> 
    7891                <show>dnd</show> 
     
    8699                <command signal="Kitty_hit"><say>DO NOT HIT THIS CUTE KITTY!</say></command> 
    87100            </commands> 
    88              
    89             <on-enter target="Cat"> 
    90                 <say>Hello little cute cat! :)</say> 
    91                 <say>/me opened the door. You can go inside</say> 
    92                 <add-exit>inside:into the tower (1)</add-exit> 
    93             </on-enter> 
    94              
    95             <on-leave target="Cat"> 
    96                 <say>Goodbye little Cat!</say> 
    97                 <say>/me closed the door</say> 
    98                 <del-exit>inside</del-exit> 
    99             </on-leave> 
    100101        </npc> 
    101102    </place> 
     
    151152        </npc> 
    152153    </place> 
    153      
     154 
    154155    <place name="into the tower (3)"> 
    155156        <description>In this strange room, there is a spider, and a door.</description> 
    156157        <go spec="left" place="into the tower (2)" /> 
    157          
     158 
    158159        <npc name="Spider"> 
     160            <on-leave> 
     161                <follow target="actor">into the tower (1), wizard's room</follow> 
     162            </on-leave> 
     163 
    159164            <presence> 
    160165                <show>chat</show> 
     
    162167                <image>spider.png</image> 
    163168            </presence> 
    164              
     169 
    165170            <commands> 
    166171                <command name="look at %self%"> 
     
    175180                </command> 
    176181            </commands> 
    177              
     182        </npc> 
     183 
     184        <thing name="door"> 
    178185            <on-leave> 
    179                 <follow target="actor">into the tower (1), wizard's room</follow
     186                <del-exit>front</del-exit
    180187            </on-leave> 
    181         </npc> 
    182          
    183         <thing name="door"> 
     188 
    184189            <commands> 
    185190                <command name="open door with %s" objects="wizard's key"> 
     
    188193                </command> 
    189194            </commands> 
    190             <on-leave> 
    191                 <del-exit>front</del-exit> 
    192             </on-leave> 
    193195        </thing> 
    194196    </place> 
  • adventure/world.dtd

    r143 r155  
    1515 respawn CDATA #IMPLIED> 
    1616  
    17 <!ELEMENT npc (on-enter?,on-leave?,on-self-enter?,on-self-leave?,commands?,presence?)> 
     17<!ELEMENT npc (on-enter?,on-leave?,on-self-enter?,on-self-leave?,presence?,go?,commands?)> 
    1818<!ATTLIST npc 
    1919 name CDATA #REQUIRED 
     
    2121 respawn CDATA #IMPLIED> 
    2222  
    23 <!ELEMENT on-enter (say?,narration?,destroy?,use?,give?,move?)> 
    24 <!ELEMENT on-leave (say?,narration?,destroy?,use?,give?,move?)> 
     23<!ELEMENT on-enter (say*,narration?,destroy?,use?,give?,move?,add-exit?)> 
     24<!ATTLIST on-enter 
     25 target CDATA #IMPLIED> 
     26<!ELEMENT on-leave (say*,narration?,destroy?,use?,give?,move?,follow?, del-exit?)> 
     27<!ATTLIST on-leave 
     28 target CDATA #IMPLIED> 
    2529 
    26 <!ELEMENT on-self-enter (say?,narration?,destroy?,use?,give?,move?)> 
    27 <!ELEMENT on-self-leave (say?,narration?,destroy?,use?,give?,move?)> 
     30<!ELEMENT on-self-enter (say*,narration?,destroy?,use?,give?,move?,signal?)> 
     31<!ELEMENT on-self-leave (say*,narration?,destroy?,use?,give?,move?)> 
    2832 
    2933<!ELEMENT commands (command+)> 
     
    3337<!ELEMENT presence (show?,status?,image?)> 
    3438 
    35 <!ELEMENT command (say?,narration?,presence?,commands?,destroy?,use?,give?,move?,signal?)> 
     39<!ELEMENT command (say*,narration?,presence?,commands?,destroy?,use?,give?,move?,signal?,add-exit?)> 
    3640<!ATTLIST command 
     41 target CDATA #IMPLIED 
    3742 name CDATA #IMPLIED 
    3843 signal CDATA #IMPLIED 
    39  objects CDATA #IMPLIED> 
     44 objects CDATA #IMPLIED 
     45 aliases CDATA #IMPLIED> 
     46 
     47<!ELEMENT add-exit (#PCDATA)> 
     48<!ELEMENT del-exit (#PCDATA)> 
    4049 
    4150<!ELEMENT show (#PCDATA)> 
     
    5059 to CDATA #IMPLIED> 
    5160  
    52 <!ELEMENT destroy (#EMPTY)
     61<!ELEMENT destroy EMPTY
    5362<!ATTLIST destroy 
    5463 target CDATA #IMPLIED> 
    5564  
    56  <!ELEMENT use (#EMPTY)
     65 <!ELEMENT use EMPTY
    5766<!ATTLIST use 
    5867 target CDATA #IMPLIED> 
    5968  
    60 <!ELEMENT give (#EMPTY)> 
     69<!ELEMENT give (#PCDATA)> 
    6170<!ATTLIST give 
    6271 target CDATA #IMPLIED 
     
    6675<!ATTLIST signal 
    6776 target CDATA #IMPLIED> 
    68   
     77 
     78<!ELEMENT follow (#PCDATA)> 
     79<!ATTLIST follow 
     80 target CDATA #IMPLIED> 
     81 
    6982<!ELEMENT description (#PCDATA)> 
    7083 
    71 <!ELEMENT go (#EMPTY)
     84<!ELEMENT go EMPTY
    7285<!ATTLIST go 
    7386 spec CDATA #IMPLIED 
    7487 place CDATA #REQUIRED> 
    7588  
    76 <!ELEMENT move (#EMPTY)> 
     89<!ELEMENT move (#PCDATA)> 
    7790<!ATTLIST move 
    7891 target CDATA #IMPLIED 
    79  place CDATA #REQUIRED> 
     92 place CDATA #IMPLIED> 
    8093  
    8194<!ELEMENT narration (#PCDATA)>  
    82  
     95<!ATTLIST narration 
     96 target CDATA #IMPLIED>