home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / games / volume7 / omega3 / part18 / omovef.c < prev    next >
C/C++ Source or Header  |  1989-07-20  |  10KB  |  322 lines

  1. /* omega copyright (C) by Laurence Raphael Brothers, 1987,1988,1989 */
  2. /* omovef.c */
  3. /* the movefunctions switch functions, for player and monster*/
  4.  
  5. #include "oglob.h"
  6.  
  7.  
  8.  
  9. void p_movefunction(movef)
  10. int movef;
  11. {
  12.   /* loc functs above traps should be activated whether levitating or not */
  13.   if (movef != L_NO_OP) clearmsg();
  14.   sign_print(Player.x,Player.y,FALSE);
  15.   if ((! Player.status[LEVITATING]) || 
  16.       gamestatusp(MOUNTED) ||
  17.       (Cmd == '@') || /* @ command activates all effects under player */
  18.       (movef < LEVITATION_AVOIDANCE)) {
  19.  
  20.     switch(movef) {
  21.       
  22.       /* miscellaneous */
  23.     case L_NO_OP:l_no_op(); break;
  24.     case L_HEDGE:l_hedge(); break;
  25.     case L_WATER:l_water(); break;
  26.     case L_LIFT:l_lift(); break;
  27.     case L_LAVA:l_lava(); break;
  28.     case L_FIRE:l_fire(); break;
  29.     case L_WHIRLWIND:l_whirlwind(); break;
  30.     case L_RUBBLE:l_rubble(); break;
  31.     case L_MAGIC_POOL:l_magic_pool(); break;
  32.     case L_ABYSS:l_abyss(); break;
  33.       
  34.     case L_PORTCULLIS_TRAP:l_portcullis_trap(); break;
  35.     case L_RAISE_PORTCULLIS:l_raise_portcullis(); break;
  36.     case L_DROP_EVERY_PORTCULLIS:l_drop_every_portcullis(); break;
  37.     case L_ARENA_EXIT:l_arena_exit(); break;
  38.     case L_TRIFID:l_trifid(); break;
  39.     case L_ENTER_COURT:l_enter_court(); break;
  40.     case L_ESCALATOR:l_escalator(); break;
  41.     case L_THRONE:l_throne(); break;
  42.  
  43.     case L_TRAP_DART:l_trap_dart(); break;
  44.     case L_TRAP_SIREN:l_trap_siren(); break;
  45.     case L_TRAP_PIT:l_trap_pit(); break;
  46.     case L_TRAP_DOOR:l_trap_door(); break;
  47.     case L_TRAP_SNARE:l_trap_snare(); break;
  48.     case L_TRAP_BLADE:l_trap_blade(); break;
  49.     case L_TRAP_FIRE:l_trap_fire(); break;
  50.     case L_TRAP_TELEPORT:l_trap_teleport(); break;
  51.     case L_TRAP_DISINTEGRATE:l_trap_disintegrate(); break;
  52.     case L_TRAP_SLEEP_GAS:l_trap_sleepgas(); break;
  53.     case L_TRAP_MANADRAIN:l_trap_manadrain(); break;
  54.     case L_TRAP_ACID:l_trap_acid(); break;
  55.     case L_TRAP_ABYSS:l_trap_abyss(); break;
  56.  
  57.    /*door functions */
  58.     case L_BANK:l_bank(); break;
  59.     case L_ARMORER:l_armorer(); break;
  60.     case L_CLUB:l_club(); break;
  61.     case L_GYM:l_gym(); break;
  62.     case L_BROTHEL:l_brothel(); break;
  63.     case L_THIEVES_GUILD:l_thieves_guild(); break;
  64.     case L_COLLEGE:l_college(); break;
  65.     case L_HEALER:l_healer(); break;
  66.     case L_STATUE_WAKE:l_statue_wake(); break;
  67.     case L_CASINO:l_casino(); break;
  68.     case L_COMMANDANT:l_commandant(); break;
  69.     case L_DINER:l_diner(); break;
  70.     case L_CRAP:l_crap(); break;
  71.     case L_TAVERN:l_tavern(); break;
  72.     case L_MERC_GUILD:l_merc_guild(); break;
  73.     case L_ALCHEMIST:l_alchemist(); break;
  74.     case L_SORCERORS:l_sorcerors(); break;
  75.     case L_CASTLE:l_castle(); break;
  76.     case L_ARENA:l_arena(); break;
  77.     case L_VAULT:l_vault(); break;
  78.     case L_DPW:l_dpw(); break;
  79.     case L_LIBRARY:l_library(); break;
  80.     case L_PAWN_SHOP:l_pawn_shop(); break;
  81.     case L_CONDO:l_condo(); break;
  82.     case L_ALTAR:l_altar(); break;
  83.     case L_TACTICAL_EXIT:l_tactical_exit(); break;
  84.     case L_HOUSE_EXIT:l_house_exit(); break;
  85.     case L_SAFE: l_safe(); break;
  86.     case L_HOUSE: l_house(); break;
  87.     case L_HOVEL: l_hovel(); break;
  88.     case L_MANSION: l_mansion(); break;
  89.     case L_COUNTRYSIDE:l_countryside(); break;
  90.     case L_ORACLE:l_oracle(); break;
  91.     case L_ORDER:l_order(); break;
  92.     case L_CARTOGRAPHER:l_cartographer(); break;
  93.  
  94.     case L_TEMPLE_WARNING:l_temple_warning(); break;
  95.     case L_ENTER_CIRCLE:l_enter_circle(); break;
  96.     case L_CIRCLE_LIBRARY:l_circle_library(); break;
  97.     case L_TOME1: l_tome1(); break;
  98.     case L_TOME2: l_tome2(); break;
  99.  
  100.     case L_CHARITY: l_charity(); break;
  101.  
  102.     case L_CHAOSTONE:l_chaostone();break;
  103.     case L_VOIDSTONE:l_voidstone();break;
  104.     case L_BALANCESTONE:l_balancestone();break;
  105.     case L_LAWSTONE:l_lawstone();break;
  106.     case L_SACRIFICESTONE:l_sacrificestone(); break;
  107.     case L_MINDSTONE:l_mindstone(); break;
  108.  
  109.     /* challenge functions */
  110.     case L_ADEPT:l_adept(); break;
  111.     case L_VOICE1:l_voice1();break;
  112.     case L_VOICE2:l_voice2();break;
  113.     case L_VOICE3:l_voice3();break;
  114.     case L_VOID:l_void();break;
  115.     case L_FIRE_STATION:l_fire_station();break;
  116.     case L_EARTH_STATION:l_earth_station();break;
  117.     case L_WATER_STATION:l_water_station();break;
  118.     case L_AIR_STATION:l_air_station();break;
  119.     case L_VOID_STATION:l_void_station();break;
  120.     }
  121.     if (movef != L_NO_OP) {
  122.       resetgamestatus(FAST_MOVE);
  123.       dataprint();
  124.     }
  125.   }
  126. }
  127.  
  128.  
  129.  
  130.  
  131.  
  132. /* execute some move function for a monster */
  133. void m_movefunction(m,movef)
  134. struct monster *m;
  135. int movef;
  136. {
  137.   /* loc functs above traps should be activated whether levitating or not */
  138.   if (! m_statusp(m,FLYING))
  139.     switch(movef) {
  140.  
  141.     /* miscellaneous */
  142.     case L_NO_OP:m_no_op(m); break;
  143.     case L_WATER:m_water(m); break;
  144.     case L_LAVA:m_lava(m); break;
  145.     case L_FIRE:m_fire(m); break;
  146.     case L_MAGIC_POOL:m_water(m); break;
  147.     case L_ABYSS: m_abyss(m); break;
  148.  
  149.     case L_TRAP_DART:m_trap_dart(m); break;
  150.     case L_TRAP_PIT:m_trap_pit(m); break;
  151.     case L_TRAP_DOOR:m_trap_door(m); break;
  152.     case L_TRAP_SNARE:m_trap_snare(m); break;
  153.     case L_TRAP_BLADE:m_trap_blade(m); break;
  154.     case L_TRAP_FIRE:m_trap_fire(m); break;
  155.     case L_TRAP_TELEPORT:m_trap_teleport(m); break;
  156.     case L_TRAP_DISINTEGRATE:m_trap_disintegrate(m); break;
  157.     case L_TRAP_MANADRAIN:m_trap_manadrain(m); break;
  158.     case L_TRAP_SLEEP_GAS:m_trap_sleepgas(m); break;
  159.     case L_TRAP_ACID:m_trap_acid(m); break;
  160.     case L_TRAP_ABYSS:m_trap_abyss(m);break;
  161.  
  162.     case L_ALTAR:m_altar(m); break;
  163.     }
  164. }
  165.  
  166. #ifdef MSDOS
  167. /* ****Moved here from another file**** */
  168. /* if sign is true, always print message, otherwise do so only sometimes */
  169. void sign_print(x,y,sign)
  170. int x,y,sign;
  171. {
  172.   if ((Level->site[x][y].p_locf >= CITYSITEBASE) &&
  173.       (Level->site[x][y].p_locf < CITYSITEBASE+NUMCITYSITES))
  174.     CitySiteList[Level->site[x][y].p_locf - CITYSITEBASE][0] = TRUE;
  175.   switch(Level->site[x][y].p_locf) {
  176.   case L_CHARITY:
  177.     print1("You notice a sign: The Rampart Orphanage And Hospice For The Needy.");
  178.     break;
  179.   case L_MANSION:
  180.     print1("You notice a sign:");
  181.     print2("This edifice protected by DeathWatch Devices, Ltd.");
  182.     morewait();
  183.     break;
  184.   case L_GRANARY:  
  185.     print1("You notice a sign:");
  186.     print2("Public Granary: Entrance Strictly Forbidden.");
  187.     break;
  188.   case L_PORTCULLIS:
  189.     if (Level->site[x][y].locchar == FLOOR)
  190.       print1("You see a groove in the floor and slots above you.");
  191.     break;
  192.   case L_STABLES:
  193.     print1("You notice a sign:");
  194.     print2("Village Stables");
  195.     break;
  196.   case L_COMMONS:
  197.     print1("You notice a sign:");
  198.     print2("Village Commons: No wolves allowed.");
  199.     break;
  200.   case L_MAZE:
  201.     print1("You notice a sign:");
  202.     print2("Hedge maze closed for trifid extermination.");
  203.     break;
  204.   case L_BANK:
  205.     if (sign) {
  206.       print1("You notice a sign:");
  207.       print2("First Bank of Omega: Autoteller Carrel.");
  208.     }
  209.     break;
  210.   case L_TEMPLE:
  211.     print1("You see the ornate portico of the Rampart Pantheon");
  212.     break;
  213.   case L_ARMORER:
  214.     if (sign) {
  215.       print1("You notice a sign:");
  216.       print2("Julie's Armor of Proof and Weapons of Quality");
  217.     }
  218.     break;
  219.   case L_CLUB:
  220.     if (sign) {
  221.       print1("You notice a sign:");
  222.       print2("Rampart Explorers' Club.");
  223.     }
  224.     break;
  225.   case L_GYM:
  226.     if (sign) {
  227.       print1("You notice a sign:");
  228.       print2("The Rampart Gymnasium, (affil. Rampart Coliseum).");
  229.     }
  230.     break;
  231.   case L_HEALER:
  232.     if (sign) {
  233.       print1("You notice a sign:");
  234.       print2("Rampart Healers. Member RMA.");
  235.     }
  236.     break;
  237.   case L_CASINO:
  238.     if (sign) {
  239.       print1("You notice a sign:");
  240.       print2("Rampart Mithril Nugget Casino.");
  241.     }
  242.     break;
  243.   case L_SEWER:
  244.     print1("A sewer entrance. You don't want to go down THERE, do you?");
  245.     break;
  246.   case L_COMMANDANT:
  247.     if (sign) {
  248.       print1("You notice a sign:");
  249.       print2("Commandant Sonder's Rampart-fried Lyzzard partes. Open 24 hrs.");
  250.     }
  251.     break;
  252.   case L_DINER:
  253.     if (sign) {
  254.       print1("You notice a sign:");
  255.       print2("The Rampart Diner. All you can eat, 25Au.");
  256.     }
  257.     break;
  258.   case L_CRAP:
  259.     if (sign) {
  260.       print1("You notice a sign:"); 
  261.       print2("Les Crapeuleaux. (****)");
  262.     }
  263.     break;
  264.   case L_TAVERN:
  265.     if (sign) {
  266.       print1("You notice a sign:"); 
  267.       print2("The Centaur and Nymph -- J. Riley, prop.");
  268.     }
  269.     break;
  270.   case L_ALCHEMIST:
  271.     if (sign) {
  272.       print1("You notice a sign:"); 
  273.       print2("Ambrosias' Potions et cie.");
  274.     }
  275.     break;
  276.   case L_DPW:
  277.     if (sign) {
  278.       print1("You notice a sign:"); 
  279.       print2("Rampart Department of Public Works.");
  280.     }
  281.     break;
  282.   case L_LIBRARY:
  283.     if (sign) {
  284.       print1("You notice a sign:"); 
  285.       print2("Rampart Public Library.");
  286.     }
  287.     break;
  288.   case L_CONDO:
  289.     if (sign) {
  290.       print1("You notice a sign:"); 
  291.       if (gamestatusp(SOLD_CONDO)) 
  292.     print2("Home Sweet Home");
  293.       else print2("Luxury Condominium For Sale; Inquire Within");
  294.     }
  295.     break;
  296.   case L_PAWN_SHOP:
  297.     if (sign) {
  298.       print1("You notice a sign:"); 
  299.       print2("Knight's Pawn Shop.");
  300.     }
  301.     break;
  302.   case L_CEMETARY:
  303.     print1("You notice a sign:"); 
  304.     print2("Rampart City Cemetary. Closed -- Full.");
  305.     break;
  306.   case L_GARDEN:
  307.     print1("You notice a sign:"); 
  308.     print2("Rampart Botanical Gardens---Do not deface statues.");
  309.     break;
  310.   case L_JAIL:
  311.     print1("You notice a sign:"); 
  312.     print2("Rampart City Gaol -- always room for more.");
  313.     break;
  314.   case L_ORACLE:
  315.     print1("You notice a sign:");
  316.     print2("The Oracle of the Cyan Flames");
  317.     morewait();
  318.     break;
  319.   }
  320. }
  321. #endif
  322.