Advertisement
Guest User

rpg

a guest
Oct 21st, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. -- sthocastic language
  2. -- -- programs are run due to events
  3. -- -- events may or may not conclude
  4. -- -- action on events decided by a dice roll
  5. -- object-oriented language
  6. -- -- inactive objects must be defined as NPC's
  7. -- -- active objects must be defined as PC's
  8. -- -- objects defined by using UPPER CASE
  9. -- language weakly typed, every basic unit is a attribute, namely attr
  10. -- code lines presented after a $ symbol
  11.  
  12. -- attribution and declaration of attributes
  13. $ attr attr_name::value
  14. $ attr_name::value
  15.  
  16. -- definition and declaration of objects
  17. $ HERO HERO_NAME(attr[] bio)
  18.  
  19. -- definition of functions, namely quest, both inputs, requirements and companion can be ommited
  20. -- note that the outputs, object and the attributes, are different returns, both can be ommited
  21. $ quest quest_name(attr[] requirements){...}(attr[] reward, NPC rescue)
  22. $ quest quest_name(attr[] requirements, NPC companion){...}()
  23.  
  24. -- to run an function you must assign it to a PC object
  25. -- sometimes variable names can be ommited from call via implict declaration
  26. $ HERO_NAME::quest_name
  27. $ HERO ARTHAS([strength::10,speed::5])::quest([strength::2,speed:3]){...}()
  28.  
  29. -- due to the sthocastic factor of RPG language, you can increase the chances of a quest being succesfully completed by assinging it to a group of PC's
  30. $ HERO[] PARTY([ARTHAS(...),TYRION(...)])::quest_name
  31.  
  32. -- to enable log of events and returnment a quest must have a BARD companion, since its the only object with IO factor
  33. $ BARD BARD_NAME(attr[] bio, scroll output_log)
  34.  
  35. -- the rewards from quests are added to hero bio's, to recover it you must ask the hero, of course a bard have to do it
  36. -- again its obvious that since read scroll is a quest assigend to the bard, the hero can refuse to share his reward, thus causing the the quest to fail
  37. $ BARD_NAME::read_scroll(HERO_NAME::attr_name)
  38.  
  39. -- as any good rpg, the main story must begin in a tavern
  40. $ quest tavern(){}()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement