/*Major code upgrade here. Added a few spells to allow people to move around during storms, and a few random effects. */ if (weather_info.sky == SKY_BLIZZARD) { if (((in_room->sector_type == SECT_INSIDE) || (in_room->room_flags == ROOM_INDOORS)) && ((to_room->sector_type != SECT_INSIDE )|| (to_room->room_flags !=ROOM_INDOORS)) &&((!IS_AFFECTED(ch, AFF_FLYING)) && (!IS_AFFECTED(ch,AFF_HASTE)) && (!IS_AFFECTED(ch,AFF_INFRARED)))) { send_to_char( "It's a {WBlizzard{x outside rest, relax, wait the storm out.\n\r", ch ); return; } /* I hate these damned nested if statements, but it's the nicest way I know of to do this one */ if ( IS_AFFECTED ( ch, AFF_FLYING ) && (IS_SET(ch->parts,PART_WINGS))) { /* we've established we're a flying race. Now what size wings do we have?? */ if ((ch->race == race_lookup("pixie"))&&(ch->race == race_lookup("avian"))) //small { if ( number_range( 0, 100) >= 85 ) /* 15 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/2; return; } } if ((ch->race == race_lookup("kenku")) &&(ch->race == race_lookup("gryphon")) &&(ch->race == race_lookup("gryfalcon")) &&(ch->race == race_lookup("phoenix"))) //medium { if ( number_range( 0, 100) >= 90 ) /* 10 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/3; return; } } if ((ch->race == race_lookup("draconian")) &&(ch->race == race_lookup("crystal-dragon")) &&(ch->race == race_lookup("silver-dragon")) &&(ch->race == race_lookup("valkyrie")) ) //rather large { if ( number_range( 0, 100) >= 95 ) /* 5 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/4; return; } } } else if ( IS_AFFECTED ( ch, AFF_FLYING ) ) { if ( number_range( 0, 100) >= 75 ) /* 25 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/2; return; } } if ( IS_AFFECTED ( ch, AFF_INFRARED ) ) { if ( number_range( 0, 100) >= 75 ) /* 25 % chance of sight loss */ { send_to_char( "Your infravision begins to fail. Have a seat for a few minutes.\n\r", ch ); ch->move = ch->move/2; return; } } } if (weather_info.sky == SKY_HAILSTORM) { if (((in_room->sector_type == SECT_INSIDE) || (in_room->room_flags == ROOM_INDOORS)) && ((to_room->sector_type != SECT_INSIDE )|| (to_room->room_flags !=ROOM_INDOORS)) &&((!IS_AFFECTED(ch, AFF_FLYING)) && (!IS_AFFECTED(ch,AFF_HASTE)) && (!IS_AFFECTED(ch,AFF_INFRARED)))) { send_to_char( "It's {YHailing{x outside rest, relax, wait the storm out.\n\r", ch ); return; } /* I hate these damned nested if statements, but it's the nicest way I know of to do this one */ if ( IS_AFFECTED ( ch, AFF_FLYING ) && (IS_SET(ch->parts,PART_WINGS))) { /* we've established we're a flying race. Now what size wings do we have?? */ if ((ch->race == race_lookup("pixie"))&&(ch->race == race_lookup("avian"))) //small { if ( number_range( 0, 100) >= 85 ) /* 15 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/2; return; } } if ((ch->race == race_lookup("kenku")) &&(ch->race == race_lookup("gryphon")) &&(ch->race == race_lookup("gryfalcon")) &&(ch->race == race_lookup("phoenix"))) //medium { if ( number_range( 0, 100) >= 90 ) /* 10 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/3; return; } } if ((ch->race == race_lookup("draconian")) &&(ch->race == race_lookup("crystal-dragon")) &&(ch->race == race_lookup("silver-dragon")) &&(ch->race == race_lookup("valkyrie")) ) //rather large { if ( number_range( 0, 100) >= 95 ) /* 5 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/4; return; } } } else if ( IS_AFFECTED ( ch, AFF_FLYING ) ) { if ( number_range( 0, 100) >= 75 ) /* 25 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/2; return; } } if ( IS_AFFECTED ( ch, AFF_INFRARED ) ) { if ( number_range( 0, 100) >= 75 ) /* 25 % chance of sight loss */ { send_to_char( "Your infravision begins to fail. Have a seat for a few minutes.\n\r", ch ); ch->move = ch->move/2; return; } } } if (weather_info.sky == SKY_ICESTORM) { if (((in_room->sector_type == SECT_INSIDE) || (in_room->room_flags == ROOM_INDOORS)) && ((to_room->sector_type != SECT_INSIDE )|| (to_room->room_flags !=ROOM_INDOORS)) &&((!IS_AFFECTED(ch, AFF_FLYING)) && (!IS_AFFECTED(ch,AFF_HASTE)) && (!IS_AFFECTED(ch,AFF_INFRARED)))) { send_to_char( "It's a {BIceStorm{x outside rest, relax, wait the storm out.\n\r", ch ); return; } /* I hate these damned nested if statements, but it's the nicest way I know of to do this one */ if ( IS_AFFECTED ( ch, AFF_FLYING ) && (IS_SET(ch->parts,PART_WINGS))) { /* we've established we're a flying race. Now what size wings do we have?? */ if ((ch->race == race_lookup("pixie"))&&(ch->race == race_lookup("avian"))) //small { if ( number_range( 0, 100) >= 85 ) /* 15 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/2; return; } } if ((ch->race == race_lookup("kenku")) &&(ch->race == race_lookup("gryphon")) &&(ch->race == race_lookup("gryfalcon")) &&(ch->race == race_lookup("phoenix"))) //medium { if ( number_range( 0, 100) >= 90 ) /* 10 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/3; return; } } if ((ch->race == race_lookup("draconian")) &&(ch->race == race_lookup("crystal-dragon")) &&(ch->race == race_lookup("silver-dragon")) &&(ch->race == race_lookup("valkyrie")) ) //rather large { if ( number_range( 0, 100) >= 95 ) /* 5 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/4; return; } } } else if ( IS_AFFECTED ( ch, AFF_FLYING ) ) { if ( number_range( 0, 100) >= 75 ) /* 25 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/2; return; } } if ( IS_AFFECTED ( ch, AFF_INFRARED ) ) { if ( number_range( 0, 100) >= 75 ) /* 25 % chance of sight loss */ { send_to_char( "Your infravision begins to fail. Have a seat for a few minutes.\n\r", ch ); ch->move = ch->move/2; return; } } } if (weather_info.sky == SKY_FOGGY) { if (((in_room->sector_type == SECT_INSIDE) || (in_room->room_flags == ROOM_INDOORS)) && ((to_room->sector_type != SECT_INSIDE )|| (to_room->room_flags !=ROOM_INDOORS)) &&((!IS_AFFECTED(ch, AFF_FLYING)) && (!IS_AFFECTED(ch,AFF_HASTE)) && (!IS_AFFECTED(ch,AFF_INFRARED)))) { send_to_char( "You wouldn't be able to see where you were going, due to the {Cfog{x.\n\r", ch ); return; } if ( IS_AFFECTED ( ch, AFF_FLYING ) && (IS_SET(ch->parts,PART_WINGS))) { if ((ch->race == race_lookup("pixie"))&&(ch->race == race_lookup("avian"))) //small { if ( number_range( 0, 100) >= 85 ) /* 15 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/2; return; } } if ((ch->race == race_lookup("kenku")) &&(ch->race == race_lookup("gryphon")) &&(ch->race == race_lookup("gryfalcon")) &&(ch->race == race_lookup("phoenix"))) //medium { if ( number_range( 0, 100) >= 90 ) /* 10 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/3; return; } } if ((ch->race == race_lookup("draconian")) &&(ch->race == race_lookup("crystal-dragon")) &&(ch->race == race_lookup("silver-dragon")) &&(ch->race == race_lookup("valkyrie")) ) //rather large { if ( number_range( 0, 100) >= 95 ) /* 5 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/4; return; } } } else if ( IS_AFFECTED ( ch, AFF_FLYING ) ) { if ( number_range( 0, 100) >= 75 ) /* 25 % chance for these poor souls */ { send_to_char( "Your poor wings can't take any more. Have a seat and rest for a few minutes.\n\r", ch ); ch->move = ch->move/2; return; } } if ( IS_AFFECTED ( ch, AFF_INFRARED ) ) { if ( number_range( 0, 100) >= 75 ) /* 25 % chance of sight loss */ { send_to_char( "Your infravision begins to fail. Have a seat for a few minutes.\n\r", ch ); ch->move = ch->move/2; return; } } }