Exemplo n.º 1
0
static void
GiveRadios (RESPONSE_REF R)
{
	if (PLAYER_SAID (R, we_will_transfer_now))
	{
		SET_GAME_STATE (RADIOACTIVES_PROVIDED, 1);

		NPCPhrase (FUEL_UP0);
		NPCPhrase (FUEL_UP1);		
		AlienTalkSegue (1);

		LockMutex (GraphicsLock);
		//CommData.AlienAmbientArray[2].AnimFlags |= ANIM_DISABLED; // JMS
		UnlockMutex (GraphicsLock);

		XFormColorMap (GetColorMapAddress (
				SetAbsColorMapIndex (CommData.AlienColorMap, 0)
				), ONE_SECOND / 2);

		AlienTalkSegue ((COUNT)~0);

		RevealSelf (0);
	}
	else
	{
		if (PLAYER_SAID (R, what_will_you_give_us))
			NPCPhrase (MESSAGE_GARBLED_1);
		else if (PLAYER_SAID (R, before_radios_we_need_info))
			NPCPhrase (MESSAGE_GARBLED_2);

		Response (we_will_transfer_now, GiveRadios);
		Response (what_will_you_give_us, GiveRadios);
		Response (before_radios_we_need_info, GiveRadios);
	}
}
Exemplo n.º 2
0
static void
ZFPTalkSegue (COUNT wait_track)
{
	LastAlien = FOT_ALIEN;
	SelectAlienZOQ (0);
	AlienTalkSegue (wait_track);
}
Exemplo n.º 3
0
static void
ExitConversation (RESPONSE_REF Response)
{
	SET_GAME_STATE (BATTLE_SEGUE, 0);

	if (PLAYER_SAID (Response, bye_ally_space))
		NPCPhrase (GOODBYE_ALLY_SPACE);
	else if (PLAYER_SAID (Response, bye_friendly_space))
		NPCPhrase (GOODBYE_FRIENDLY_SPACE);
	else if (PLAYER_SAID (Response, part_in_peace))
		NPCPhrase (KEEP_IT_SECRET);
	else if (PLAYER_SAID (Response, we_sorry_space))
		NPCPhrase (APOLOGIZE_AT_HOMEWORLD);
	else if (PLAYER_SAID (Response, give_info_space))
		NPCPhrase (HERES_SOME_INFO);
	else if (PLAYER_SAID (Response, bye_angry_space))
		NPCPhrase (GOODBYE_ANGRY_SPACE);
	else if (PLAYER_SAID (Response, attack_you_now))
	{
		NPCPhrase (YIPES);

		SET_GAME_STATE (BATTLE_SEGUE, 1);
	}
	else if (PLAYER_SAID (Response, we_fight_again_space))
	{
		NPCPhrase (OK_FIGHT_AGAIN_SPACE);

		SET_GAME_STATE (BATTLE_SEGUE, 1);
	}
	else if (PLAYER_SAID (Response, die_slugboy)
			|| PLAYER_SAID (Response, we_fight_1)
			|| PLAYER_SAID (Response, we_fight_2)
			|| PLAYER_SAID (Response, pay_for_crimes)
			|| PLAYER_SAID (Response, tell_me_coordinates)
			|| PLAYER_SAID (Response, changed_mind))
	{
		if (PLAYER_SAID (Response, tell_me_coordinates))
			NPCPhrase (FAKE_COORDINATES);
		NPCPhrase (OK_WE_FIGHT_AT_PLUTO);

		SET_GAME_STATE (BATTLE_SEGUE, 1);
	}
	else if (PLAYER_SAID (Response, join_us))
	{
		if (ActivateStarShip (SPATHI_SHIP, FEASIBILITY_STUDY) == 0)
			NPCPhrase (TOO_SCARY);
		else
		{
			NPCPhrase (WILL_JOIN);

			AlienTalkSegue ((COUNT)~0);
			ActivateStarShip (SPATHI_SHIP, 1);
			/* Make the Eluder escort captained by Fwiffo alone */
			SetEscortCrewComplement (SPATHI_SHIP, 1,
					NAME_OFFSET + NUM_CAPTAINS_NAMES);
		}
	}
}
Exemplo n.º 4
0
static void
GiveRadios (RESPONSE_REF R)
{
	if (PLAYER_SAID (R, we_will_transfer_now))
	{
		SET_GAME_STATE (RADIOACTIVES_PROVIDED, 1);

		NPCPhrase (FUEL_UP0);
		NPCPhrase (FUEL_UP1);		
		AlienTalkSegue (1);

		// JMS_GFX: Disable noisy static animation in hi-res.
		if (RESOLUTION_FACTOR > 0) {
			CommData.AlienTalkDesc.AnimFlags &= ~PAUSE_TALKING;
			CommData.AlienAmbientArray[0].AnimFlags &= ~ANIM_DISABLED;
			CommData.AlienAmbientArray[1].AnimFlags &= ~ANIM_DISABLED;
			CommData.AlienAmbientArray[2].AnimFlags |= ANIM_DISABLED;
		}
		// End color transform anim in lo-res.
		else
			CommData.AlienAmbientArray[2].AnimFlags |= ANIM_DISABLED;

		XFormColorMap (GetColorMapAddress (
				SetAbsColorMapIndex (CommData.AlienColorMap, 0)
				), ONE_SECOND / 2);

		AlienTalkSegue ((COUNT)~0);

		RevealSelf (0);
	}
	else
	{
		if (PLAYER_SAID (R, what_will_you_give_us))
			NPCPhrase (MESSAGE_GARBLED_1);
		else if (PLAYER_SAID (R, before_radios_we_need_info))
			NPCPhrase (MESSAGE_GARBLED_2);

		Response (we_will_transfer_now, GiveRadios);
		Response (what_will_you_give_us, GiveRadios);
		Response (before_radios_we_need_info, GiveRadios);
	}
}
Exemplo n.º 5
0
static void
Foreplay (RESPONSE_REF R)
{
	if (PLAYER_SAID (R, whats_my_reward)
			|| PLAYER_SAID (R, what_about_us))
	{
		if (PLAYER_SAID (R, whats_my_reward))
			NPCPhrase (HERES_REWARD);
		else
			NPCPhrase (ABOUT_US);
		NPCPhrase (MORE_COMFORTABLE);
		AlienTalkSegue (1);
		XFormColorMap (GetColorMapAddress (
				SetAbsColorMapIndex (CommData.AlienColorMap, 1)
				), ONE_SECOND);
		AlienTalkSegue ((COUNT)~0);

		SET_GAME_STATE (PLAYER_HAVING_SEX, 1);
	}
	else if (PLAYER_SAID (R, why_lights_off))
	{
		NPCPhrase (LIGHTS_OFF_BECAUSE);

		DISABLE_PHRASE (why_lights_off);
	}
	else if (PLAYER_SAID (R, evil_monster))
	{
		NPCPhrase (NOT_EVIL_MONSTER);

		DISABLE_PHRASE (evil_monster);
	}

	if (PHRASE_ENABLED (why_lights_off))
		Response (why_lights_off, Foreplay);
	else if (PHRASE_ENABLED (evil_monster))
		Response (evil_monster, Foreplay);
	else
		Response (disease, Sex);
	Response (in_the_spirit, Sex);
	Response (what_in_mind, Sex);
	Response (hands_off, FriendlyExit);
}
Exemplo n.º 6
0
static void
CombatIsInevitable (RESPONSE_REF R)
{
	SET_GAME_STATE (BATTLE_SEGUE, 1);

	if (PLAYER_SAID (R, bye_zombie))
	{
		NPCPhrase (GOODBYE_ZOMBIE);

		SET_GAME_STATE (BATTLE_SEGUE, 0);
	}
	else if (PLAYER_SAID (R, bye_pre_zombie))
		NPCPhrase (GOODBYE_PRE_ZOMBIE);
	else if (PLAYER_SAID (R, can_we_be_friends))
	{
		NPCPhrase (SURE_FRIENDS);

		SET_GAME_STATE (UMGAH_MENTIONED_TRICKS, 1);
	}
	else if (PLAYER_SAID (R, evil_blobbies_give_up))
	{
		NPCPhrase (NOT_EVIL_BLOBBIES);

		SET_GAME_STATE (UMGAH_EVIL_BLOBBIES, 1);
	}
	else if (PLAYER_SAID (R, evil_blobbies_must_die))
		NPCPhrase (OH_NO_WE_WONT);
	else if (PLAYER_SAID (R, threat))
		NPCPhrase (NO_THREAT);
	else if (PLAYER_SAID (R, dont_believe))
	{
		NPCPhrase (THEN_DIE);

		SET_GAME_STATE (KNOW_UMGAH_ZOMBIES, 1);
		SET_GAME_STATE (UMGAH_VISITS, 0);
	}
	else if (PLAYER_SAID (R, bye_unknown))
	{
		NPCPhrase (GOODBYE_UNKNOWN);

		SET_GAME_STATE (BATTLE_SEGUE, 0);
	}
	else if (PLAYER_SAID (R, bye_post_zombie))
	{
		NPCPhrase (FUNNY_IDEA);

		AlienTalkSegue ((COUNT)~0);
		ActivateStarShip (UMGAH_SHIP, 4);
		SET_GAME_STATE (UMGAH_HOSTILE, 1);
	}
}
Exemplo n.º 7
0
static void
FriendlyExit (RESPONSE_REF R)
{
	SET_GAME_STATE (BATTLE_SEGUE, 0);

	if (PLAYER_SAID (R, bye))
		NPCPhrase (GOODBYE);
	else if (PLAYER_SAID (R, im_on_my_way)
			|| PLAYER_SAID (R, doing_this_for_you)
			|| PLAYER_SAID (R, if_i_die))
		NPCPhrase (GOOD_LUCK);
	else if (PLAYER_SAID (R, bye_before_vault))
		NPCPhrase (GOODBYE_BEFORE_VAULT);
	else if (PLAYER_SAID (R, bye_after_vault))
		NPCPhrase (GOODBYE_AFTER_VAULT);
	else if (PLAYER_SAID (R, bye_before_ambush))
		NPCPhrase (GOODBYE_BEFORE_AMBUSH);
	else if (PLAYER_SAID (R, bye_after_ambush))
		NPCPhrase (GOODBYE_AFTER_AMBUSH);
	else
	{
		if (PLAYER_SAID (R, hands_off))
			NPCPhrase (OK_WONT_USE_HANDS);
		else if (PLAYER_SAID (R, not_much_more_to_say))
			NPCPhrase (THEN_STOP_TALKING);
		NPCPhrase (LATER);
		NPCPhrase (SEX_GOODBYE);

		AlienTalkSegue (2);
		XFormColorMap (GetColorMapAddress (
				SetAbsColorMapIndex (CommData.AlienColorMap, 0)
				), ONE_SECOND / 2);
		AlienTalkSegue ((COUNT)~0);

		SET_GAME_STATE (PLAYER_HAD_SEX, 1);
		SET_GAME_STATE (PLAYER_HAVING_SEX, 0);
	}
}
Exemplo n.º 8
0
static void
ExitConversation (RESPONSE_REF R)
{
	setSegue (Segue_peace);

	if (PLAYER_SAID (R, bye_neutral))
		NPCPhrase (GOODBYE_NEUTRAL);
	else if (PLAYER_SAID (R, what_do_i_do_now))
		NPCPhrase (FIX_IT);
	else if (PLAYER_SAID (R, thanks_now_we_eat_you))
	{
		NPCPhrase (HIDEOUS_MONSTERS);

		SET_GAME_STATE (SUPOX_HOSTILE, 1);
		SET_GAME_STATE (SUPOX_HOME_VISITS, 0);
		SET_GAME_STATE (SUPOX_VISITS, 0);
	}
	else if (PLAYER_SAID (R, bye_after_space))
		NPCPhrase (GOODBYE_AFTER_SPACE);
	else if (PLAYER_SAID (R, bye_before_space))
		NPCPhrase (GOODBYE_BEFORE_SPACE);
	else if (PLAYER_SAID (R, bye_allied_homeworld))
		NPCPhrase (GOODBYE_ALLIED_HOMEWORLD);
	else if (PLAYER_SAID (R, can_you_help))
	{
		NPCPhrase (HOW_HELP);
		if (EscortFeasibilityStudy (SUPOX_SHIP) == 0)
			NPCPhrase (DONT_NEED);
		else
		{
			NPCPhrase (HAVE_4_SHIPS);

			AlienTalkSegue ((COUNT)~0);
			AddEscortShips (SUPOX_SHIP, 4);
		}
	}
}
Exemplo n.º 9
0
static void
ExitConversation (RESPONSE_REF R)
{
	SET_GAME_STATE (BATTLE_SEGUE, 0);

	if (PLAYER_SAID (R, bye_neutral))
		NPCPhrase (GOODBYE_NEUTRAL);
	else if (PLAYER_SAID (R, what_do_i_do_now))
		NPCPhrase (FIX_IT);
	else if (PLAYER_SAID (R, thanks_now_we_eat_you))
	{
		NPCPhrase (HIDEOUS_MONSTERS);

		SET_GAME_STATE (SUPOX_HOSTILE, 1);
		SET_GAME_STATE (SUPOX_HOME_VISITS, 0);
		SET_GAME_STATE (SUPOX_VISITS, 0);
	}
	else if (PLAYER_SAID (R, bye_after_space))
		NPCPhrase (GOODBYE_AFTER_SPACE);
	else if (PLAYER_SAID (R, bye_before_space))
		NPCPhrase (GOODBYE_BEFORE_SPACE);
	else if (PLAYER_SAID (R, bye_allied_homeworld))
		NPCPhrase (GOODBYE_ALLIED_HOMEWORLD);
	else if (PLAYER_SAID (R, can_you_help))
	{
		NPCPhrase (HOW_HELP);
		if (ActivateStarShip (SUPOX_SHIP, FEASIBILITY_STUDY) == 0)
			NPCPhrase (DONT_NEED);
		else
		{
			NPCPhrase (HAVE_4_SHIPS);

			AlienTalkSegue ((COUNT)~0);
			ActivateStarShip (SUPOX_SHIP, 4);
		}
	}
}
Exemplo n.º 10
0
static void
Intro (void)
{
    BYTE NumVisits, Manner;

    if (LOBYTE (GLOBAL (CurrentActivity)) == WON_LAST_BATTLE)
    {
        NPCPhrase (OUT_TAKES);

        setSegue (Segue_peace);
        return;
    }

    if (!GET_GAME_STATE (MET_ORZ_BEFORE))
        NPCPhrase (INIT_HELLO);

    Manner = GET_GAME_STATE (ORZ_MANNER);
    if (Manner == 2)
    {
        CommData.AlienColorMap =
            SetAbsColorMapIndex (CommData.AlienColorMap, 1);

        NumVisits = GET_GAME_STATE (ORZ_VISITS);
        switch (NumVisits++)
        {
        case 0:
            NPCPhrase (HOSTILE_HELLO_1);
            break;
        case 1:
            NPCPhrase (HOSTILE_HELLO_2);
            --NumVisits;
            break;
        }
        SET_GAME_STATE (ORZ_VISITS, NumVisits);

        setSegue (Segue_hostile);
    }
    else if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 6))
    {
        NumVisits = GET_GAME_STATE (TAALO_VISITS);
        if (Manner != 1)
        {
            switch (NumVisits++)
            {
            case 0:
                NPCPhrase (FRIENDLY_ALLIED_TAALO_HELLO_1);
                break;
            case 1:
                NPCPhrase (FRIENDLY_ALLIED_TAALO_HELLO_2);
                --NumVisits;
                break;
            }
        }
        else
        {
            switch (NumVisits++)
            {
            case 0:
                NPCPhrase (ANGRY_TAALO_HELLO_1);
                break;
            case 1:
                NPCPhrase (ANGRY_TAALO_HELLO_2);
                --NumVisits;
                break;
            }
        }
        SET_GAME_STATE (TAALO_VISITS, NumVisits);

        TaaloWorld ((RESPONSE_REF)0);
    }
    else if (Manner == 3 && CheckAlliance (ORZ_SHIP) == GOOD_GUY)
    {
        if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
        {
            NumVisits = GET_GAME_STATE (ORZ_HOME_VISITS);
            switch (NumVisits++)
            {
            case 0:
                NPCPhrase (ALLIED_HOMEWORLD_HELLO_1);
                break;
            case 1:
                NPCPhrase (ALLIED_HOMEWORLD_HELLO_2);
                break;
            case 2:
                NPCPhrase (ALLIED_HOMEWORLD_HELLO_3);
                break;
            case 3:
                NPCPhrase (ALLIED_HOMEWORLD_HELLO_4);
                --NumVisits;
                break;
            }
            SET_GAME_STATE (ORZ_HOME_VISITS, NumVisits);
        }
        else
        {
            NumVisits = GET_GAME_STATE (ORZ_VISITS);
            switch (NumVisits++)
            {
            case 0:
                NPCPhrase (ALLIED_SPACE_HELLO_1);
                break;
            case 1:
                NPCPhrase (ALLIED_SPACE_HELLO_2);
                break;
            case 2:
                NPCPhrase (ALLIED_SPACE_HELLO_3);
                break;
            case 3:
                NPCPhrase (ALLIED_SPACE_HELLO_4);
                --NumVisits;
                break;
            }
            SET_GAME_STATE (ORZ_VISITS, NumVisits);
        }

        OrzAllied ((RESPONSE_REF)0);
    }
    else if (Manner != 1)
    {
        if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
        {
            NumVisits = GET_GAME_STATE (ORZ_HOME_VISITS);
            switch (NumVisits++)
            {
            case 0:
                NPCPhrase (NEUTRAL_HOMEWORLD_HELLO_1);
                break;
            case 1:
                NPCPhrase (NEUTRAL_HOMEWORLD_HELLO_2);
                break;
            case 2:
                NPCPhrase (NEUTRAL_HOMEWORLD_HELLO_3);
                break;
            case 3:
                NPCPhrase (NEUTRAL_HOMEWORLD_HELLO_4);
                --NumVisits;
                break;
            }
            SET_GAME_STATE (ORZ_HOME_VISITS, NumVisits);
        }
        else
        {
            NumVisits = GET_GAME_STATE (ORZ_VISITS);
            switch (NumVisits++)
            {
            case 0:
                NPCPhrase (NEUTRAL_SPACE_HELLO_1);
                break;
            case 1:
                NPCPhrase (NEUTRAL_SPACE_HELLO_2);
                break;
            case 2:
                NPCPhrase (NEUTRAL_SPACE_HELLO_3);
                break;
            case 3:
                NPCPhrase (NEUTRAL_SPACE_HELLO_4);
                --NumVisits;
                break;
            }
            SET_GAME_STATE (ORZ_VISITS, NumVisits);
        }

        OrzNeutral ((RESPONSE_REF)0);
    }
    else
    {
        if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
        {
            NumVisits = GET_GAME_STATE (ORZ_HOME_VISITS);
            switch (NumVisits++)
            {
            case 0:
                NPCPhrase (ANGRY_HOMEWORLD_HELLO_1);
                break;
            case 1:
                NPCPhrase (ANGRY_HOMEWORLD_HELLO_2);
                --NumVisits;
                break;
            }
            SET_GAME_STATE (ORZ_HOME_VISITS, NumVisits);
        }
        else
        {
            NumVisits = GET_GAME_STATE (ORZ_VISITS);
            switch (NumVisits++)
            {
            case 0:
                NPCPhrase (ANGRY_SPACE_HELLO_1);
                break;
            case 1:
                NPCPhrase (ANGRY_SPACE_HELLO_2);
                --NumVisits;
                break;
            }
            SET_GAME_STATE (ORZ_VISITS, NumVisits);
        }

        OrzAngry ((RESPONSE_REF)0);
    }

    if (!GET_GAME_STATE (MET_ORZ_BEFORE))
    {
        SET_GAME_STATE (MET_ORZ_BEFORE, 1);

        // Disable talking anim and run the computer report
        EnableTalkingAnim (FALSE);
        AlienTalkSegue (1);
        // Run whatever is left with talking anim
        EnableTalkingAnim (TRUE);
    }
}
Exemplo n.º 11
0
static void
ExitConversation (RESPONSE_REF R)
{
	setSegue (Segue_peace);

	if (PLAYER_SAID (R, bye_neutral))
		NPCPhrase (GOODBYE_NEUTRAL);
	else if (PLAYER_SAID (R, bye_after_space))
		NPCPhrase (GOODBYE_AFTER_SPACE);
	else if (PLAYER_SAID (R, bye_before_space))
		NPCPhrase (GOODBYE_BEFORE_SPACE);
	else if (PLAYER_SAID (R, bye_allied_homeworld))
		NPCPhrase (GOODBYE_ALLIED_HOMEWORLD);
	else if (PLAYER_SAID (R, bye_bomb))
		NPCPhrase (GOODBYE_BOMB);
	else if (PLAYER_SAID (R, demand_bomb))
	{
		NPCPhrase (GUARDS_FIGHT);

		setSegue (Segue_hostile);
	}
	else if (PLAYER_SAID (R, got_ultron)
			|| PLAYER_SAID (R, hey_wait_got_ultron))
	{
		if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 6))
		{
			NPCPhrase (NO_ULTRON_AT_BOMB);

			SET_GAME_STATE (REFUSED_ULTRON_AT_BOMB, 1);
		}
		else
		{
			if (PLAYER_SAID (R, got_ultron))
				NPCPhrase (DONT_WANT_TO_LOOK);
			else
				NPCPhrase (TAUNT_US_BUT_WE_LOOK);
			if (GET_GAME_STATE (ULTRON_CONDITION) < 4)
			{
				switch (GET_GAME_STATE (UTWIG_INFO))
				{
					case 0:
						if (PLAYER_SAID (R, got_ultron))
							NPCPhrase (SICK_TRICK_1);
						else
						{
							NPCPhrase (TRICKED_US_1);

							setSegue (Segue_hostile);
						}
						break;
					case 1:
						if (PLAYER_SAID (R, got_ultron))
							NPCPhrase (SICK_TRICK_2);
						else
						{
							NPCPhrase (TRICKED_US_2);

							setSegue (Segue_hostile);
						}
						break;
				}
				SET_GAME_STATE (UTWIG_INFO, 1);
			}
			else
			{
				NPCPhrase (HAPPY_DAYS);
				if (GET_GAME_STATE (KOHR_AH_FRENZY))
					NPCPhrase (TOO_LATE);
				else
				{
					NPCPhrase (OK_ATTACK_KOHRAH);

					AddEvent (RELATIVE_EVENT, 0, 0, 0, ADVANCE_UTWIG_SUPOX_MISSION);
				}

				SET_GAME_STATE (UTWIG_HAVE_ULTRON, 1);
				SET_GAME_STATE (ULTRON_CONDITION, 5);

				SET_GAME_STATE (UTWIG_VISITS, 0);
				SET_GAME_STATE (SUPOX_VISITS, 0);
				SET_GAME_STATE (UTWIG_HOME_VISITS, 0);
				SET_GAME_STATE (SUPOX_HOME_VISITS, 0);
				SET_GAME_STATE (BOMB_VISITS, 0);

				SET_GAME_STATE (SUPOX_INFO, 0);
				SET_GAME_STATE (UTWIG_INFO, 0);
				SET_GAME_STATE (SUPOX_WAR_NEWS, 0);
				SET_GAME_STATE (UTWIG_WAR_NEWS, 0);
				SET_GAME_STATE (SUPOX_HOSTILE, 0);
				SET_GAME_STATE (UTWIG_HOSTILE, 0);

				SetRaceAllied (UTWIG_SHIP, TRUE);
				SetRaceAllied (SUPOX_SHIP, TRUE);
			}
		}
	}
	else if (PLAYER_SAID (R, can_you_help))
	{
		NPCPhrase (HOW_HELP);
		if (EscortFeasibilityStudy (UTWIG_SHIP) == 0)
			NPCPhrase (DONT_NEED);
		else
		{
			NPCPhrase (HAVE_4_SHIPS);

			AlienTalkSegue ((COUNT)~0);
			AddEscortShips (UTWIG_SHIP, 4);
		}
	}
}
Exemplo n.º 12
0
static void
ExitConversation (RESPONSE_REF R)
{
	SET_GAME_STATE (BATTLE_SEGUE, 0);

	if (PLAYER_SAID (R, friendly_bye_space))
		NPCPhrase (FRIENDLY_GOODBYE_SPACE);
	else if (PLAYER_SAID (R, neutral_bye_space))
		NPCPhrase (NEUTRAL_GOODBYE_SPACE);
	else if (PLAYER_SAID (R, bye_angry))
		NPCPhrase (GOODBYE_ANGRY);
	else if (PLAYER_SAID (R, bye_friendly))
		NPCPhrase (GOODBYE_FRIENDLY);
	else if (PLAYER_SAID (R, we_here_to_help)
			|| PLAYER_SAID (R, we_need_help))
	{
		if (PLAYER_SAID (R, we_here_to_help))
			NPCPhrase (NEED_HELP);
		else
			NPCPhrase (GIVE_HELP);
		NPCPhrase (ALMOST_ALLIANCE);

		SET_GAME_STATE (PKUNK_MANNER, 3);
		SET_GAME_STATE (PKUNK_VISITS, 0);
		SET_GAME_STATE (PKUNK_HOME_VISITS, 0);
		SET_GAME_STATE (PKUNK_INFO, 0);

		AddEvent (RELATIVE_EVENT, 6, 0, 0, ADVANCE_PKUNK_MISSION);
		if (ActivateStarShip (PKUNK_SHIP, FEASIBILITY_STUDY) == 0)
			NPCPhrase (INIT_NO_ROOM);
		else
		{
			NPCPhrase (INIT_SHIP_GIFT);
			AlienTalkSegue ((COUNT)~0);
			PrepareShip ();
		}
	}
	else if (PLAYER_SAID (R, try_to_be_nicer))
	{
		NPCPhrase (CANT_ASK_FOR_MORE);
		NPCPhrase (VISIT_OUR_HOMEWORLD);

		SET_GAME_STATE (PKUNK_MANNER, 3);
		SET_GAME_STATE (PKUNK_VISITS, 0);
		SET_GAME_STATE (PKUNK_HOME_VISITS, 0);
		SET_GAME_STATE (PKUNK_INFO, 0);
	}
	else if (PLAYER_SAID (R, must_conquer)
			|| PLAYER_SAID (R, obey))
	{
		if (PLAYER_SAID (R, obey))
			NPCPhrase (NO_OBEY);
		else
		{
			NPCPhrase (BAD_IDEA);

			SET_GAME_STATE (PKUNK_MANNER, 2);
		}
		SET_GAME_STATE (BATTLE_SEGUE, 1);
	}
	else if (PLAYER_SAID (R, die_idiot_fools))
	{
		NPCPhrase (VERY_WELL);

		SET_GAME_STATE (BATTLE_SEGUE, 1);
	}
	else if (PLAYER_SAID (R, suit_yourself))
		NPCPhrase (GOODBYE_MIGRATION);
	else
	{
		BYTE ReasonMask;

		ReasonMask = GET_GAME_STATE (PKUNK_REASONS);
		if (PLAYER_SAID (R, good_reason_1))
		{
			NPCPhrase (WE_GO_HOME_1);
			ReasonMask |= GOOD_REASON_1;
			AddEvent (RELATIVE_EVENT, 0, 0, 0, ADVANCE_PKUNK_MISSION);
		}
		else if (PLAYER_SAID (R, good_reason_2))
		{
			NPCPhrase (WE_GO_HOME_2);
			ReasonMask |= GOOD_REASON_2;
			AddEvent (RELATIVE_EVENT, 0, 0, 0, ADVANCE_PKUNK_MISSION);
		}
		else if (PLAYER_SAID (R, bad_reason_1))
		{
			NPCPhrase (NO_GO_HOME_1);
			ReasonMask |= BAD_REASON_1;
		}
		else if (PLAYER_SAID (R, bad_reason_2))
		{
			NPCPhrase (NO_GO_HOME_2);
			ReasonMask |= BAD_REASON_2;
		}
		SET_GAME_STATE (PKUNK_REASONS, ReasonMask);
	}
}
Exemplo n.º 13
0
static void
NatureOfConversation (RESPONSE_REF R)
{
	BYTE num_new_rainbows;
	UWORD rainbow_mask;
	COUNT Credit;

	if (PLAYER_SAID (R, get_on_with_business))
	{
		SET_GAME_STATE (MELNORME_YACK_STACK2, 5);
		R = 0;
	}

	Credit = DeltaCredit (0);
	if (R == 0)
	{
		BYTE stack;

		stack = (BYTE)(GET_GAME_STATE (MELNORME_YACK_STACK2) - 5);
		switch (stack++)
		{
			case 0:
				NPCPhrase (HELLO_AND_DOWN_TO_BUSINESS_1);
				break;
			case 1:
				NPCPhrase (HELLO_AND_DOWN_TO_BUSINESS_2);
				break;
			case 2:
				NPCPhrase (HELLO_AND_DOWN_TO_BUSINESS_3);
				break;
			case 3:
				NPCPhrase (HELLO_AND_DOWN_TO_BUSINESS_4);
				break;
			case 4:
				NPCPhrase (HELLO_AND_DOWN_TO_BUSINESS_5);
				break;
			case 5:
				NPCPhrase (HELLO_AND_DOWN_TO_BUSINESS_6);
				break;
			case 6:
				NPCPhrase (HELLO_AND_DOWN_TO_BUSINESS_7);
				break;
			case 7:
				NPCPhrase (HELLO_AND_DOWN_TO_BUSINESS_8);
				break;
			case 8:
				NPCPhrase (HELLO_AND_DOWN_TO_BUSINESS_9);
				break;
			default:
				--stack;
				NPCPhrase (HELLO_AND_DOWN_TO_BUSINESS_10);
				break;
		}
		SET_GAME_STATE (MELNORME_YACK_STACK2, stack + 5);
	}

	rainbow_mask = MAKE_WORD (
			GET_GAME_STATE (RAINBOW_WORLD0),
			GET_GAME_STATE (RAINBOW_WORLD1)
			);
	num_new_rainbows = (BYTE)(-GET_GAME_STATE (MELNORME_RAINBOW_COUNT));
	while (rainbow_mask)
	{
		if (rainbow_mask & 1)
			++num_new_rainbows;

		rainbow_mask >>= 1;
	}

	if (GLOBAL_SIS (FuelOnBoard) > 0
			|| GLOBAL_SIS (TotalBioMass)
			|| Credit
			|| num_new_rainbows)
	{
		if (!GET_GAME_STATE (TRADED_WITH_MELNORME))
		{
			SET_GAME_STATE (TRADED_WITH_MELNORME, 1);

			NPCPhrase (TRADING_INFO);
		}

		if (R == 0)
		{
				/* Melnorme reports any news and turns purple */
			NPCPhrase (BUY_OR_SELL);
			AlienTalkSegue(1);
			XFormColorMap (GetColorMapAddress (
					SetAbsColorMapIndex (CommData.AlienColorMap, 1)
					), ONE_SECOND / 2);
			AlienTalkSegue((COUNT)~0);
		}
		else if (PLAYER_SAID (R, why_turned_purple))
		{
			SET_GAME_STATE (WHY_MELNORME_PURPLE, 1);

			NPCPhrase (TURNED_PURPLE_BECAUSE);
		}
		else if (PLAYER_SAID (R, done_selling))
		{
			NPCPhrase (OK_DONE_SELLING);
		}
		else if (PLAYER_SAID (R, done_buying))
		{
			NPCPhrase (OK_DONE_BUYING);
		}

		if (!GET_GAME_STATE (WHY_MELNORME_PURPLE))
		{
			Response (why_turned_purple, NatureOfConversation);
		}
		if (!AskedToBuy)
			Response (buy, DoBuy);
		if (PHRASE_ENABLED (sell))
			Response (sell, DoSell);
		Response (goodbye, ExitConversation);
	}
	else /* needs to be rescued */
	{
		if (GET_GAME_STATE (MELNORME_RESCUE_REFUSED))
		{
			NPCPhrase (CHANGED_MIND);

			Response (yes_changed_mind, DoRescue);
			Response (no_changed_mind, ExitConversation);
		}
		else
		{
			BYTE num_rescues;

			num_rescues = GET_GAME_STATE (MELNORME_RESCUE_COUNT);
			switch (num_rescues)
			{
				case 0:
					NPCPhrase (RESCUE_EXPLANATION);
					break;
				case 1:
					NPCPhrase (RESCUE_AGAIN_1);
					break;
				case 2:
					NPCPhrase (RESCUE_AGAIN_2);
					break;
				case 3:
					NPCPhrase (RESCUE_AGAIN_3);
					break;
				case 4:
					NPCPhrase (RESCUE_AGAIN_4);
					break;
				case 5:
					NPCPhrase (RESCUE_AGAIN_5);
					break;
			 }

			if (num_rescues < 5)
			{
				++num_rescues;
				SET_GAME_STATE (MELNORME_RESCUE_COUNT, num_rescues);
			}

			NPCPhrase (SHOULD_WE_HELP_YOU);

			Response (yes_help, DoRescue);
			Response (no_help, ExitConversation);
		}
	}
}
Exemplo n.º 14
0
static void
DoSell (RESPONSE_REF R)
{
	BYTE num_new_rainbows;
	UWORD rainbow_mask;
	SIZE added_credit;
	int what_to_sell_queued = 0;

	rainbow_mask = MAKE_WORD (
			GET_GAME_STATE (RAINBOW_WORLD0),
			GET_GAME_STATE (RAINBOW_WORLD1)
			);
	num_new_rainbows = (BYTE)(-GET_GAME_STATE (MELNORME_RAINBOW_COUNT));
	while (rainbow_mask)
	{
		if (rainbow_mask & 1)
			++num_new_rainbows;

		rainbow_mask >>= 1;
	}

	if (!PLAYER_SAID (R, sell))
	{
		if (PLAYER_SAID (R, sell_life_data))
		{
			DWORD TimeIn;

			added_credit = GLOBAL_SIS (TotalBioMass) * BIO_CREDIT_VALUE;

			NPCPhrase (SOLD_LIFE_DATA1);
			NPCPhrase (-(int)GLOBAL_SIS (TotalBioMass));
			NPCPhrase (SOLD_LIFE_DATA2);
			NPCPhrase (-(int)added_credit);
			NPCPhrase (SOLD_LIFE_DATA3);
			// queue WHAT_TO_SELL before talk-segue
			if (num_new_rainbows)
			{
				NPCPhrase (WHAT_TO_SELL);
				what_to_sell_queued = 1;
			}
			AlienTalkSegue (1);

			DrawCargoStrings ((BYTE)~0, (BYTE)~0);
			SleepThread (ONE_SECOND / 2);
			TimeIn = GetTimeCounter ();
			DrawCargoStrings (
					(BYTE)NUM_ELEMENT_CATEGORIES,
					(BYTE)NUM_ELEMENT_CATEGORIES
					);
			do
			{
				TimeIn = GetTimeCounter ();
				if (AnyButtonPress (TRUE))
				{
					DeltaCredit (GLOBAL_SIS (TotalBioMass) * BIO_CREDIT_VALUE);
					GLOBAL_SIS (TotalBioMass) = 0;
				}
				else
				{
					--GLOBAL_SIS (TotalBioMass);
					DeltaCredit (BIO_CREDIT_VALUE);
				}
				DrawCargoStrings (
						(BYTE)NUM_ELEMENT_CATEGORIES,
						(BYTE)NUM_ELEMENT_CATEGORIES
						);
			} while (GLOBAL_SIS (TotalBioMass));
			SleepThread (ONE_SECOND / 2);

			LockMutex (GraphicsLock);
			ClearSISRect (DRAW_SIS_DISPLAY);
			UnlockMutex (GraphicsLock);
		}
		else /* if (R == sell_rainbow_locations) */
		{
			added_credit = num_new_rainbows * (250 * BIO_CREDIT_VALUE);

			NPCPhrase (SOLD_RAINBOW_LOCATIONS1);
			NPCPhrase (-(int)num_new_rainbows);
			NPCPhrase (SOLD_RAINBOW_LOCATIONS2);
			NPCPhrase (-(int)added_credit);
			NPCPhrase (SOLD_RAINBOW_LOCATIONS3);

			num_new_rainbows += GET_GAME_STATE (MELNORME_RAINBOW_COUNT);
			SET_GAME_STATE (MELNORME_RAINBOW_COUNT, num_new_rainbows);
			num_new_rainbows = 0;

			DeltaCredit (added_credit);
		}
		
		AskedToBuy = FALSE;
	}

	if (GLOBAL_SIS (TotalBioMass) || num_new_rainbows)
	{
		if (!what_to_sell_queued)
			NPCPhrase (WHAT_TO_SELL);

		if (GLOBAL_SIS (TotalBioMass))
			Response (sell_life_data, DoSell);
		if (num_new_rainbows)
			Response (sell_rainbow_locations, DoSell);
		Response (done_selling, NatureOfConversation);
	}
	else
	{
		if (PLAYER_SAID (R, sell))
			NPCPhrase (NOTHING_TO_SELL);
		DISABLE_PHRASE (sell);

		NatureOfConversation (R);
	}
}
Exemplo n.º 15
0
static void
NatureOfConversation (RESPONSE_REF R)
{
	BYTE num_new_rainbows;
	UWORD rainbow_mask;
	COUNT Credit;

	if (PLAYER_SAID (R, get_on_with_business))
	{
		SET_GAME_STATE (MELNORME_YACK_STACK2, 5);
		R = 0;
	}

	// Draw credits display
	DeltaCredit (0);
	Credit = GetAvailableCredits ();
	if (R == 0)
	{
		BYTE stack = GET_GAME_STATE (MELNORME_YACK_STACK2) - 5;
		NPCPhrase (GetLineSafe (hello_and_down_to_business_lines, stack));
		if (stack < (NUM_HELLO_LINES - 1))
			++stack;
		SET_GAME_STATE (MELNORME_YACK_STACK2, stack + 5);
	}

	rainbow_mask = MAKE_WORD (
			GET_GAME_STATE (RAINBOW_WORLD0),
			GET_GAME_STATE (RAINBOW_WORLD1)
			);
	num_new_rainbows = (BYTE)(-GET_GAME_STATE (MELNORME_RAINBOW_COUNT));
	while (rainbow_mask)
	{
		if (rainbow_mask & 1)
			++num_new_rainbows;

		rainbow_mask >>= 1;
	}

	if (GLOBAL_SIS (FuelOnBoard) > 0
			|| GLOBAL_SIS (TotalBioMass)
			|| Credit
			|| num_new_rainbows)
	{
		if (!GET_GAME_STATE (TRADED_WITH_MELNORME))
		{
			SET_GAME_STATE (TRADED_WITH_MELNORME, 1);

			NPCPhrase (TRADING_INFO);
		}

		if (R == 0)
		{
				/* Melnorme reports any news and turns purple */
			NPCPhrase (BUY_OR_SELL);
			AlienTalkSegue (1);
			XFormColorMap (GetColorMapAddress (
					SetAbsColorMapIndex (CommData.AlienColorMap, 1)
					), ONE_SECOND / 2);
			AlienTalkSegue ((COUNT)~0);
		}
		else if (PLAYER_SAID (R, why_turned_purple))
		{
			SET_GAME_STATE (WHY_MELNORME_PURPLE, 1);

			NPCPhrase (TURNED_PURPLE_BECAUSE);
		}
		else if (PLAYER_SAID (R, done_selling))
		{
			NPCPhrase (OK_DONE_SELLING);
		}
		else if (PLAYER_SAID (R, done_buying))
		{
			NPCPhrase (OK_DONE_BUYING);
		}

		if (!GET_GAME_STATE (WHY_MELNORME_PURPLE))
		{
			Response (why_turned_purple, NatureOfConversation);
		}
		if (!AskedToBuy)
			Response (buy, DoBuy);
		if (PHRASE_ENABLED (sell))
			Response (sell, DoSell);
		Response (goodbye, ExitConversation);
	}
	else /* needs to be rescued */
	{
		if (GET_GAME_STATE (MELNORME_RESCUE_REFUSED))
		{
			NPCPhrase (CHANGED_MIND);

			Response (yes_changed_mind, DoRescue);
			Response (no_changed_mind, ExitConversation);
		}
		else
		{
			BYTE num_rescues = GET_GAME_STATE (MELNORME_RESCUE_COUNT);
			NPCPhrase (GetLineSafe (rescue_lines, num_rescues));

			if (num_rescues < NUM_RESCUE_LINES - 1)
			{
				++num_rescues;
				SET_GAME_STATE (MELNORME_RESCUE_COUNT, num_rescues);
			}

			NPCPhrase (SHOULD_WE_HELP_YOU);

			Response (yes_help, DoRescue);
			Response (no_help, ExitConversation);
		}
	}
}