示例#1
0
文件: zoqfotc.c 项目: njvack/uqm-ios
LOCDATA*
init_zoqfot_comm (void)
{
	LOCDATA *retval;

	zoqfot_desc.init_encounter_func = Intro;
	zoqfot_desc.post_encounter_func = post_zoqfot_enc;
	zoqfot_desc.uninit_encounter_func = uninit_zoqfot;

	zoqfot_desc.AlienTextWidth = (SIS_TEXT_WIDTH >> 1) - TEXT_X_OFFS;

	if (CheckAlliance (ZOQFOTPIK_SHIP) == GOOD_GUY
			|| LOBYTE (GLOBAL (CurrentActivity)) == WON_LAST_BATTLE)
	{
		setSegue (Segue_peace);
	}
	else
	{
		setSegue (Segue_hostile);
	}
	
	retval = &zoqfot_desc;

	return (retval);
}
示例#2
0
文件: druugec.c 项目: intgr/sc2-uqm
LOCDATA*
init_druuge_comm (void)
{
	LOCDATA *retval;

	SlaveryCount = 0;
	AttemptedSalvage = FALSE;

	druuge_desc.init_encounter_func = Intro;
	druuge_desc.post_encounter_func = post_druuge_enc;
	druuge_desc.uninit_encounter_func = uninit_druuge;

	druuge_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1);
	druuge_desc.AlienTextBaseline.y = 70;
	druuge_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16;

	if ((GET_GAME_STATE (DRUUGE_MANNER) == 0
			&& (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7)))
			|| LOBYTE (GLOBAL (CurrentActivity)) == WON_LAST_BATTLE)
	{
		setSegue (Segue_peace);
	}
	else
	{
		setSegue (Segue_hostile);
	}
	retval = &druuge_desc;

	return (retval);
}
示例#3
0
LOCDATA*
init_ilwrath_comm (void)
{
	LOCDATA *retval;

	ilwrath_desc.init_encounter_func = Intro;
	ilwrath_desc.post_encounter_func = post_ilwrath_enc;
	ilwrath_desc.uninit_encounter_func = uninit_ilwrath;

	ilwrath_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1);
	ilwrath_desc.AlienTextBaseline.y = RES_SIS_SCALE(70);
	ilwrath_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16;

	if (GET_GAME_STATE (PROBE_ILWRATH_ENCOUNTER)
			|| (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA)
			& ((1 << 4) | (1 << 5)))
			|| LOBYTE (GLOBAL (CurrentActivity)) == WON_LAST_BATTLE)
	{
		setSegue (Segue_peace);
	}
	else
	{
		setSegue (Segue_hostile);
	}
	retval = &ilwrath_desc;

	return (retval);
}
示例#4
0
文件: spahome.c 项目: intgr/sc2-uqm
LOCDATA*
init_spahome_comm ()
{
	LOCDATA *retval;

	spahome_desc.init_encounter_func = Intro;
	spahome_desc.post_encounter_func = post_spahome_enc;
	spahome_desc.uninit_encounter_func = uninit_spahome;

	luaUqm_comm_init (NULL, NULL_RESOURCE);
			// Initialise Lua for string interpolation. This will be
			// generalised in the future.

	spahome_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1);
	spahome_desc.AlienTextBaseline.y = 0;
	spahome_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16;

	// use alternate "Safe Ones" track if available
	spahome_desc.AlienAltSongRes = SPAHOME_MUSIC;
	spahome_desc.AlienSongFlags |= LDASF_USE_ALTERNATE;

	if (GET_GAME_STATE (SPATHI_MANNER) == 3)
	{
		setSegue (Segue_peace);
	}
	else
	{
		setSegue (Segue_hostile);
	}

	retval = &spahome_desc;

	return (retval);
}
示例#5
0
LOCDATA*
init_orz_comm (void)
{
    LOCDATA *retval;

    orz_desc.init_encounter_func = Intro;
    orz_desc.post_encounter_func = post_orz_enc;
    orz_desc.uninit_encounter_func = uninit_orz;

    luaUqm_comm_init(NULL, NULL_RESOURCE);
    // Initialise Lua for string interpolation. This will be
    // generalised in the future.

    orz_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1);
    orz_desc.AlienTextBaseline.y = 0;
    orz_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16;

    if (GET_GAME_STATE (ORZ_MANNER) == 3
            || LOBYTE (GLOBAL (CurrentActivity)) == WON_LAST_BATTLE)
    {
        setSegue (Segue_peace);
    }
    else
    {
        setSegue (Segue_hostile);
    }
    retval = &orz_desc;

    return (retval);
}
示例#6
0
文件: druugec.c 项目: intgr/sc2-uqm
static void
ExitConversation (RESPONSE_REF R)
{
	if (PLAYER_SAID (R, bye))
	{
		setSegue (Segue_peace);

		if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
		{
			if (SlaveryCount)
			{
				UWORD PreviousSlaves;

				PreviousSlaves = MAKE_WORD (
						GET_GAME_STATE (CREW_SOLD_TO_DRUUGE0),
						GET_GAME_STATE (CREW_SOLD_TO_DRUUGE1)
						);
				SlaveryCount += PreviousSlaves;
				if (SlaveryCount > 250 && PreviousSlaves <= 250)
				{
					if (PreviousSlaves > 100)
						GLOBAL (CrewCost) += (22 - 7);
					else
						GLOBAL (CrewCost) += 22;
				}
				else if (SlaveryCount > 100 && PreviousSlaves <= 100)
					GLOBAL (CrewCost) += 7;

				SET_GAME_STATE (CREW_SOLD_TO_DRUUGE0, LOBYTE (SlaveryCount));
				SET_GAME_STATE (CREW_SOLD_TO_DRUUGE1, HIBYTE (SlaveryCount));
			}

			switch (GET_GAME_STATE (DRUUGE_HOME_VISITS))
			{
				case 1:
					NPCPhrase (BYE_FROM_TRADE_WORLD_1);
					break;
				default:
					NPCPhrase (BYE_FROM_TRADE_WORLD_2);
					break;
			}
		}
		else if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 6))
			NPCPhrase (GOODBYE_FROM_BOMB_PLANET);
		else
			NPCPhrase (GOODBYE_FROM_SPACE);
	}
	else /* if (R == then_we_take_bomb) */
	{
		setSegue (Segue_hostile);

		NPCPhrase (FIGHT_FOR_BOMB);
	}
}
示例#7
0
文件: comandr.c 项目: njvack/uqm-ios
LOCDATA*
init_commander_comm ()
{
    LOCDATA *retval;

    commander_desc.init_encounter_func = Intro;
    commander_desc.post_encounter_func = post_commander_enc;
    commander_desc.uninit_encounter_func = uninit_commander;

    if (GET_GAME_STATE (RADIOACTIVES_PROVIDED))
    {
        commander_desc.AlienAmbientArray[2].AnimFlags |= ANIM_DISABLED;
        // regular track -- let's make sure
        commander_desc.AlienSongFlags &= ~LDASF_USE_ALTERNATE;
    }
    else
    {
        commander_desc.AlienAmbientArray[2].AnimFlags &= ~ANIM_DISABLED;
        // use alternate 'low-power' track if available
        commander_desc.AlienAltSongRes = COMMANDER_LOWPOW_MUSIC;
        commander_desc.AlienSongFlags |= LDASF_USE_ALTERNATE;
    }

    commander_desc.AlienTextWidth = 143;
    commander_desc.AlienTextBaseline.x = 164;
    commander_desc.AlienTextBaseline.y = 20;

    setSegue (Segue_peace);
    retval = &commander_desc;

    return (retval);
}
示例#8
0
LOCDATA*
init_shofixti_comm (void)
{
	static LOCDATA shofixti_desc;
 	LOCDATA *retval;
	
	shofixti_desc = (RESOLUTION_FACTOR == 0 ? shofixti_desc_1x : shofixti_desc_4x);

	shofixti_desc.init_encounter_func = Intro;
	shofixti_desc.post_encounter_func = post_shofixti_enc;
	shofixti_desc.uninit_encounter_func = uninit_shofixti;

	luaUqm_comm_init (NULL, NULL_RESOURCE);
			// Initialise Lua for string interpolation. This will be
			// generalised in the future.

	shofixti_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1);
	shofixti_desc.AlienTextBaseline.y = 0;
	shofixti_desc.AlienTextWidth = SIS_TEXT_WIDTH;

	setSegue (Segue_peace);

	retval = &shofixti_desc;

	return (retval);
}
示例#9
0
文件: melnorm.c 项目: intgr/sc2-uqm
LOCDATA*
init_melnorme_comm (void)
{
	LOCDATA *retval;

	melnorme_desc.init_encounter_func = Intro;
	melnorme_desc.post_encounter_func = post_melnorme_enc;
	melnorme_desc.uninit_encounter_func = uninit_melnorme;

	luaUqm_comm_init (NULL, NULL_RESOURCE);
			// Initialise Lua for string interpolation. This will be
			// generalised in the future.

	melnorme_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1);
	melnorme_desc.AlienTextBaseline.y = 0;
	melnorme_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16;

	local_stack0 = 0;
	local_stack1 = 0;

	prevMsgMode = SMM_UNDEFINED;

	setSegue (Segue_peace);
	AskedToBuy = FALSE;
	retval = &melnorme_desc;

	return (retval);
}
示例#10
0
LOCDATA*
init_commander_comm ()
{
	static LOCDATA commander_desc;
	LOCDATA *retval;

	commander_desc = (RESOLUTION_FACTOR == 0 ? commander_desc_1x : commander_desc_4x);

	commander_desc.init_encounter_func = Intro;
	commander_desc.post_encounter_func = post_commander_enc;
	commander_desc.uninit_encounter_func = uninit_commander;

	luaUqm_comm_init(NULL, NULL_RESOURCE);
			// Initialise Lua for string interpolation. This will be
			// generalised in the future.

	if (GET_GAME_STATE (RADIOACTIVES_PROVIDED))
	{
		// JMS_GFX: Disable noisy static animation in hi-res.
		if (RESOLUTION_FACTOR > 0)
		{
			commander_desc.AlienTalkDesc.AnimFlags &= ~PAUSE_TALKING;
			commander_desc.AlienAmbientArray[0].AnimFlags &= ~ANIM_DISABLED;
			commander_desc.AlienAmbientArray[1].AnimFlags &= ~ANIM_DISABLED;
		}
		commander_desc.AlienAmbientArray[2].AnimFlags |= ANIM_DISABLED;
		// regular track -- let's make sure
		commander_desc.AlienSongFlags &= ~LDASF_USE_ALTERNATE;
	}
	else
	{	
		// JMS_GFX: Enable noisy static animation in hi-res.
		if (RESOLUTION_FACTOR > 0)
		{
			commander_desc.AlienTalkDesc.AnimFlags |= PAUSE_TALKING;
			commander_desc.AlienAmbientArray[0].AnimFlags |= ANIM_DISABLED;
			commander_desc.AlienAmbientArray[1].AnimFlags |= ANIM_DISABLED;
		}
		commander_desc.AlienAmbientArray[2].AnimFlags &= ~ANIM_DISABLED;
		// use alternate 'low-power' track if available
		commander_desc.AlienAltSongRes = COMMANDER_LOWPOW_MUSIC;
		commander_desc.AlienSongFlags |= LDASF_USE_ALTERNATE;
	}

	// JMS_GFX
	commander_desc.AlienTextWidth = RES_SIS_SCALE(143); // JMS_GFX
	commander_desc.AlienTextBaseline.x = RES_SIS_SCALE(164); // JMS_GFX
	commander_desc.AlienTextBaseline.y = RES_SIS_SCALE(20); // JMS_GFX

	setSegue (Segue_peace);
	retval = &commander_desc;

	return (retval);
}
示例#11
0
文件: utwigc.c 项目: njvack/uqm-ios
LOCDATA*
init_utwig_comm (void)
{
	LOCDATA *retval;

	utwig_desc.init_encounter_func = Intro;
	utwig_desc.post_encounter_func = post_utwig_enc;
	utwig_desc.uninit_encounter_func = uninit_utwig;

	utwig_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1);
	utwig_desc.AlienTextBaseline.y = 70;
	utwig_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16;

	if (GET_GAME_STATE (UTWIG_HAVE_ULTRON))
	{	// use alternate 'Happy Utwig!' track
		utwig_desc.AlienAltSongRes = UTWIG_ULTRON_MUSIC;
		utwig_desc.AlienSongFlags |= LDASF_USE_ALTERNATE;
	}
	else
	{	// regular track -- let's make sure
		utwig_desc.AlienSongFlags &= ~LDASF_USE_ALTERNATE;
	}

	if (GET_GAME_STATE (UTWIG_HAVE_ULTRON)
			|| LOBYTE (GLOBAL (CurrentActivity)) == WON_LAST_BATTLE)
	{
		setSegue (Segue_peace);
	}
	else
	{
		setSegue (Segue_hostile);
	}
	retval = &utwig_desc;

	return (retval);
}
示例#12
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);
		}
	}
}
示例#13
0
文件: druugec.c 项目: intgr/sc2-uqm
static void
Intro (void)
{
	BYTE NumVisits;

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

		setSegue (Segue_peace);
		return;
	}

	if (GET_GAME_STATE (DRUUGE_MANNER))
	{
		if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
		{
			NumVisits = GET_GAME_STATE (DRUUGE_HOME_VISITS);
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (HSTL_TRADE_WORLD_HELLO_1);
					break;
				case 1:
					NPCPhrase (HSTL_TRADE_WORLD_HELLO_2);
					--NumVisits;
					break;
			}
			SET_GAME_STATE (DRUUGE_HOME_VISITS, NumVisits);
		}
		else
		{
			NumVisits = GET_GAME_STATE (DRUUGE_VISITS);
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (HOSTILE_SPACE_HELLO_1);
					break;
				case 1:
					NPCPhrase (HOSTILE_SPACE_HELLO_2);
					--NumVisits;
					break;
			}
			SET_GAME_STATE (DRUUGE_VISITS, NumVisits);
		}

		setSegue (Segue_hostile);
	}
	else if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
	{
		{
			NumVisits = GET_GAME_STATE (DRUUGE_HOME_VISITS);
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (INITIAL_TRADE_WORLD_HELLO);
					break;
				case 1:
					NPCPhrase (SSQ_TRADE_WORLD_HELLO_1);
					break;
				case 2:
					NPCPhrase (SSQ_TRADE_WORLD_HELLO_2);
					break;
				case 3:
					NPCPhrase (SSQ_TRADE_WORLD_HELLO_3);
					break;
				case 4:
					NPCPhrase (SSQ_TRADE_WORLD_HELLO_4);
					--NumVisits;
					break;
			}
			SET_GAME_STATE (DRUUGE_HOME_VISITS, NumVisits);
		}
		if (GET_GAME_STATE (ATTACKED_DRUUGE)
				&& !GET_GAME_STATE (DRUUGE_DISCLAIMER))
		{
			// There is no HOSTILE_TRADE voice track that we know of
			// so this is currently disabled
			//NPCPhrase (HOSTILE_TRADE);
			SET_GAME_STATE (DRUUGE_DISCLAIMER, 1);
		}
		if (GET_GAME_STATE (MAIDENS_ON_SHIP)
				&& !GET_GAME_STATE (SCANNED_MAIDENS))
		{
			NPCPhrase (SCAN_MAIDENS);
			SET_GAME_STATE (SCANNED_MAIDENS, 1);
		}
		if ((GET_GAME_STATE (EGG_CASE0_ON_SHIP)
				|| GET_GAME_STATE (EGG_CASE1_ON_SHIP)
				|| GET_GAME_STATE (EGG_CASE2_ON_SHIP))
				&& !GET_GAME_STATE (SCANNED_FRAGMENTS))
		{
			if (GET_GAME_STATE (FRAGMENTS_BOUGHT) < 2)
				NPCPhrase (SCAN_FRAGMENTS);
			else
				NPCPhrase (ENOUGH_FRAGMENTS);
			SET_GAME_STATE (SCANNED_FRAGMENTS, 1);
		}
		if (GET_GAME_STATE (BURV_BROADCASTERS_ON_SHIP)
				&& !GET_GAME_STATE (SCANNED_CASTER))
		{
			NPCPhrase (SCAN_DRUUGE_CASTER);
			SET_GAME_STATE (SCANNED_CASTER, 1);
		}
		if (GET_GAME_STATE (PORTAL_SPAWNER_ON_SHIP)
				&& !GET_GAME_STATE (SCANNED_SPAWNER))
		{
			NPCPhrase (SCAN_ARILOU_SPAWNER);
			SET_GAME_STATE (SCANNED_SPAWNER, 1);
		}

		TradeWorld ((RESPONSE_REF)0);
	}
	else if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 6))
	{
		if (GET_GAME_STATE (BOMB_VISITS))
			NPCPhrase (SUBSEQ_BOMB_WORLD_HELLO);
		else
		{
			NPCPhrase (INIT_BOMB_WORLD_HELLO);
			SET_GAME_STATE (BOMB_VISITS, 1);
		}

		BombAmbush ((RESPONSE_REF)0);
	}
	else if (GET_GAME_STATE (ATTACKED_DRUUGE))
	{
		NumVisits = GET_GAME_STATE (DRUUGE_VISITS);
		switch (NumVisits++)
		{
			case 0:
				NPCPhrase (HOSTILE_SPACE_HELLO_1);
				break;
			case 1:
				NPCPhrase (HOSTILE_SPACE_HELLO_2);
				--NumVisits;
				break;
		}
		SET_GAME_STATE (DRUUGE_VISITS, NumVisits);

		setSegue (Segue_hostile);
	}
	else
	{
		NumVisits = 0;
		if (GetHeadLink (&GLOBAL (built_ship_q)) == 0)
		{
			for (NumVisits = 0; NumVisits < NUM_MODULE_SLOTS; ++NumVisits)
			{
				BYTE which_module;

				which_module = GLOBAL_SIS (ModuleSlots[NumVisits]);
				if (which_module >= GUN_WEAPON
						&& which_module <= CANNON_WEAPON)
				{
					NumVisits = 0;
					break;
				}
			}
		}

		if (NumVisits)
		{
			NumVisits = GET_GAME_STATE (DRUUGE_SALVAGE);
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (SALVAGE_YOUR_SHIP_1);
					break;
				case 1:
					NPCPhrase (SALVAGE_YOUR_SHIP_2);
					--NumVisits;
					break;
			}
			SET_GAME_STATE (DRUUGE_SALVAGE, NumVisits);

			setSegue (Segue_hostile);
			AttemptedSalvage = TRUE;
		}
		else
		{
			NumVisits = GET_GAME_STATE (DRUUGE_VISITS);
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (INIT_SPACE_HELLO);
					break;
				case 1:
					NPCPhrase (SUBSEQUENT_SPACE_HELLO);
					--NumVisits;
					break;
			}
			SET_GAME_STATE (DRUUGE_VISITS, NumVisits);

			Space ((RESPONSE_REF)0);
		}
	}
}
示例#14
0
static void
Intro (void)
{
	if (LOBYTE (GLOBAL (CurrentActivity)) == WON_LAST_BATTLE)
	{
		NPCPhrase (OUT_TAKES);

		setSegue (Segue_peace);
		return;
	}

	GetShofixtiName ();

	if (GET_GAME_STATE (SHOFIXTI_STACK2) > 2)
	{
		NPCPhrase (FRIENDLY_HELLO);

		Friendly ((RESPONSE_REF)0);
	}
	else
	{
		BYTE NumVisits;

		NumVisits = GET_GAME_STATE (SHOFIXTI_VISITS);
		if (GET_GAME_STATE (SHOFIXTI_KIA))
		{
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (HOSTILE_KATANA_1);
					break;
				case 1:
					NPCPhrase (HOSTILE_KATANA_2);
					break;
				case 2:
					NPCPhrase (HOSTILE_KATANA_3);
					break;
				case 3:
					NPCPhrase (HOSTILE_KATANA_4);
					--NumVisits;
					break;
			}
		}
		else
		{
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (HOSTILE_TANAKA_1);
					break;
				case 1:
					NPCPhrase (HOSTILE_TANAKA_2);
					break;
				case 2:
					NPCPhrase (HOSTILE_TANAKA_3);
					break;
				case 3:
					NPCPhrase (HOSTILE_TANAKA_4);
					break;
				case 4:
					NPCPhrase (HOSTILE_TANAKA_5);
					break;
				case 5:
					NPCPhrase (HOSTILE_TANAKA_6);
					break;
				case 6:
					NPCPhrase (HOSTILE_TANAKA_7);
					break;
				case 7:
					NPCPhrase (HOSTILE_TANAKA_8);
					--NumVisits;
					break;
			}
		}
		SET_GAME_STATE (SHOFIXTI_VISITS, NumVisits);

		Hostile ((RESPONSE_REF)0);
	}
}
示例#15
0
文件: utwigc.c 项目: njvack/uqm-ios
static void
Intro (void)
{
	BYTE NumVisits;

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

		setSegue (Segue_peace);
		return;
	}

	if (GET_GAME_STATE (UTWIG_HOSTILE))
	{
		if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 6))
		{
			NumVisits = GET_GAME_STATE (BOMB_VISITS);
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (HOSTILE_BOMB_HELLO_1);
					break;
				case 1:
					NPCPhrase (HOSTILE_BOMB_HELLO_2);
					--NumVisits;
					break;
			}
			SET_GAME_STATE (BOMB_VISITS, NumVisits);
		}
		else if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
		{
			NumVisits = GET_GAME_STATE (UTWIG_HOME_VISITS);
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (HOSTILE_HOMEWORLD_HELLO_1);
					break;
				case 1:
					NPCPhrase (HOSTILE_HOMEWORLD_HELLO_2);
					--NumVisits;
					break;
			}
			SET_GAME_STATE (UTWIG_HOME_VISITS, NumVisits);
		}
		else
		{
			NumVisits = GET_GAME_STATE (UTWIG_VISITS);
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (HOSTILE_SPACE_HELLO_1);
					break;
				case 1:
					NPCPhrase (HOSTILE_SPACE_HELLO_2);
					--NumVisits;
					break;
			}
			SET_GAME_STATE (UTWIG_VISITS, NumVisits);
		}

		if (!GET_GAME_STATE (ULTRON_CONDITION)
				|| (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 6)))
		{
			setSegue (Segue_hostile);
		}
		else
		{
			Response (hey_wait_got_ultron, ExitConversation);
		}
	}
	else if (CheckAlliance (UTWIG_SHIP) == GOOD_GUY)
	{
		if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
		{
			NumVisits = GET_GAME_STATE (UTWIG_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 (UTWIG_HOME_VISITS, NumVisits);

			AlliedHome ((RESPONSE_REF)0);
		}
		else
		{
			NumVisits = GET_GAME_STATE (UTWIG_SUPOX_MISSION);
			if (NumVisits == 1)
			{
				NumVisits = GET_GAME_STATE (UTWIG_VISITS);
				switch (NumVisits++)
				{
					case 0:
						NPCPhrase (HELLO_BEFORE_KOHRAH_SPACE_1);
						break;
					case 1:
						NPCPhrase (HELLO_BEFORE_KOHRAH_SPACE_2);
						--NumVisits;
						break;
				}
				SET_GAME_STATE (UTWIG_VISITS, NumVisits);

				BeforeKohrAh ((RESPONSE_REF)0);
			}
			else if (NumVisits < 5)
			{
				NumVisits = GET_GAME_STATE (UTWIG_VISITS);
				switch (NumVisits++)
				{
					case 0:
						NPCPhrase (HELLO_DURING_KOHRAH_SPACE_1);
						break;
					case 1:
						NPCPhrase (HELLO_DURING_KOHRAH_SPACE_2);
						--NumVisits;
						break;
				}
				SET_GAME_STATE (UTWIG_VISITS, NumVisits);
			}
			else
			{
				NumVisits = GET_GAME_STATE (UTWIG_VISITS);
				switch (NumVisits++)
				{
					case 0:
						NPCPhrase (HELLO_AFTER_KOHRAH_SPACE_1);
						break;
					case 1:
						NPCPhrase (HELLO_AFTER_KOHRAH_SPACE_2);
						--NumVisits;
						break;
				}
				SET_GAME_STATE (UTWIG_VISITS, NumVisits);

				AfterKohrAh ((RESPONSE_REF)0);
			}
		}
	}
	else if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 6))
	{
		NumVisits = GET_GAME_STATE (BOMB_VISITS);
		switch (NumVisits++)
		{
			case 0:
				NPCPhrase (BOMB_WORLD_HELLO_1);
				break;
			case 1:
				NPCPhrase (BOMB_WORLD_HELLO_2);
				--NumVisits;
				break;
		}
		SET_GAME_STATE (BOMB_VISITS, NumVisits);

		BombWorld ((RESPONSE_REF)0);
	}
	else
	{
		if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
		{
			NumVisits = GET_GAME_STATE (UTWIG_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 (UTWIG_HOME_VISITS, NumVisits);
		}
		else
		{
			NumVisits = GET_GAME_STATE (UTWIG_VISITS);
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (NEUTRAL_SPACE_HELLO_1);
					break;
				case 1:
					NPCPhrase (NEUTRAL_SPACE_HELLO_2);
					--NumVisits;
					break;
			}
			SET_GAME_STATE (UTWIG_VISITS, NumVisits);
		}

		NeutralUtwig ((RESPONSE_REF)0);
	}
}
示例#16
0
static void
Intro (void)
{
	BYTE NumVisits;

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

		setSegue (Segue_peace);
		return;
	}

	if (GET_GAME_STATE (SUPOX_HOSTILE))
	{
		NumVisits = GET_GAME_STATE (SUPOX_VISITS);
		switch (NumVisits++)
		{
			case 0:
				NPCPhrase (HOSTILE_SPACE_HELLO_1);
				break;
			case 1:
				NPCPhrase (HOSTILE_SPACE_HELLO_2);
				--NumVisits;
				break;
		}
		SET_GAME_STATE (SUPOX_VISITS, NumVisits);

		setSegue (Segue_peace);
	}
	else if (CheckAlliance (SUPOX_SHIP) == GOOD_GUY)
	{
		if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
		{
			NumVisits = GET_GAME_STATE (SUPOX_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 (SUPOX_HOME_VISITS, NumVisits);

			AlliedHome ((RESPONSE_REF)0);
		}
		else
		{
			NumVisits = GET_GAME_STATE (UTWIG_SUPOX_MISSION);
			if (NumVisits == 1)
			{
				NumVisits = GET_GAME_STATE (SUPOX_VISITS);
				switch (NumVisits++)
				{
					case 0:
						NPCPhrase (HELLO_BEFORE_KOHRAH_SPACE_1);
						break;
					case 1:
						NPCPhrase (HELLO_BEFORE_KOHRAH_SPACE_2);
						--NumVisits;
						break;
				}
				SET_GAME_STATE (SUPOX_VISITS, NumVisits);

				BeforeKohrAh ((RESPONSE_REF)0);
			}
			else if (NumVisits < 5)
			{
				NumVisits = GET_GAME_STATE (SUPOX_VISITS);
				switch (NumVisits++)
				{
					case 0:
						NPCPhrase (HELLO_DURING_KOHRAH_SPACE_1);
						break;
					case 1:
						NPCPhrase (HELLO_DURING_KOHRAH_SPACE_2);
						--NumVisits;
						break;
				}
				SET_GAME_STATE (SUPOX_VISITS, NumVisits);
			}
			else
			{
				NumVisits = GET_GAME_STATE (SUPOX_VISITS);
				switch (NumVisits++)
				{
					case 0:
						NPCPhrase (HELLO_AFTER_KOHRAH_SPACE_1);
						break;
					case 1:
						NPCPhrase (HELLO_AFTER_KOHRAH_SPACE_2);
						--NumVisits;
						break;
				}
				SET_GAME_STATE (SUPOX_VISITS, NumVisits);

				AfterKohrAh ((RESPONSE_REF)0);
			}
		}
	}
	else
	{
		if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
		{
			NumVisits = GET_GAME_STATE (SUPOX_HOME_VISITS);
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (NEUTRAL_HOMEWORLD_HELLO_1);
					break;
				case 1:
					NPCPhrase (NEUTRAL_HOMEWORLD_HELLO_2);
					--NumVisits;
					break;
			}
			SET_GAME_STATE (SUPOX_HOME_VISITS, NumVisits);
		}
		else
		{
			NumVisits = GET_GAME_STATE (SUPOX_VISITS);
			switch (NumVisits++)
			{
				case 0:
					NPCPhrase (NEUTRAL_SPACE_HELLO_1);
					break;
				case 1:
					NPCPhrase (NEUTRAL_SPACE_HELLO_2);
					--NumVisits;
					break;
			}
			SET_GAME_STATE (SUPOX_VISITS, NumVisits);
		}

		NeutralSupox ((RESPONSE_REF)0);
	}
}
示例#17
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);
    }
}
示例#18
0
文件: utwigc.c 项目: njvack/uqm-ios
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);
		}
	}
}
示例#19
0
文件: spahome.c 项目: intgr/sc2-uqm
static void
ExitConversation (RESPONSE_REF R)
{
	setSegue (Segue_peace);
	if (PLAYER_SAID (R, we_attack_again))
	{
		NPCPhrase (WE_FIGHT_AGAIN);

		setSegue (Segue_hostile);
	}
	else if (PLAYER_SAID (R, surrender_or_die))
	{
		NPCPhrase (DEFEND_OURSELVES);

		setSegue (Segue_hostile);
	}
	else if (PLAYER_SAID (R, we_are_vindicator))
	{
		NPCPhrase (NO_PASSWORD);

		setSegue (Segue_hostile);
	}
	else if (PLAYER_SAID (R, gort_merenga)
			|| PLAYER_SAID (R, guph_florp)
			|| PLAYER_SAID (R, wagngl_fthagn)
			|| PLAYER_SAID (R, pleeese))
	{
		NPCPhrase (WRONG_PASSWORD);

		setSegue (Segue_hostile);
	}
	else if (PLAYER_SAID (R, screw_password))
	{
		NPCPhrase (NO_PASSWORD);

		setSegue (Segue_hostile);
	}
	else if (PLAYER_SAID (R, bye_no_ally_offer))
		NPCPhrase (GOODBYE_NO_ALLY_OFFER);
	else if (PLAYER_SAID (R, bye_angry_spathi))
		NPCPhrase (GOODBYE_ANGRY_SPATHI);
	else if (PLAYER_SAID (R, bye_ally))
		NPCPhrase (GOODBYE_ALLY);
	else if (PLAYER_SAID (R, already_got_them))
	{
		NPCPhrase (EARLY_BIRD_CHECK);

		SET_GAME_STATE (SPATHI_HOME_VISITS, 0);
		SET_GAME_STATE (SPATHI_VISITS, 0);
		SET_GAME_STATE (SPATHI_PARTY, 1);
		SET_GAME_STATE (SPATHI_MANNER, 3);
	}
	else if (PLAYER_SAID (R, too_dangerous))
		NPCPhrase (WE_AGREE);
	else if (PLAYER_SAID (R, think_more))
		NPCPhrase (COWARD);
	else if (PLAYER_SAID (R, i_accept))
	{
		NPCPhrase (AWAIT_RETURN);

		SET_GAME_STATE (SPATHI_QUEST, 1);
		SET_GAME_STATE (SPATHI_MANNER, 3);
		SET_GAME_STATE (SPATHI_VISITS, 0);
	}
	else if (PLAYER_SAID (R, do_as_we_say))
	{
		NPCPhrase (DEPART_FOR_EARTH);

		SetRaceAllied (SPATHI_SHIP, TRUE);
		AddEvent (RELATIVE_EVENT, 6, 0, 0, SPATHI_SHIELD_EVENT);
		SET_GAME_STATE (SPATHI_HOME_VISITS, 0);
		SET_GAME_STATE (SPATHI_VISITS, 0);
	}
	else if (PLAYER_SAID (R, killed_them_all_1))
	{
		NPCPhrase (WILL_CHECK_1);

		if (!GET_GAME_STATE (SPATHI_CREATURES_ELIMINATED))
		{
			SET_GAME_STATE (LIED_ABOUT_CREATURES, 1);
		}
		else
		{
			SET_GAME_STATE (SPATHI_HOME_VISITS, 0);
			SET_GAME_STATE (SPATHI_VISITS, 0);
			SET_GAME_STATE (SPATHI_PARTY, 1);
			SET_GAME_STATE (SPATHI_MANNER, 3);
		}
	}
	else if (PLAYER_SAID (R, killed_them_all_2))
	{
		NPCPhrase (WILL_CHECK_2);

		if (!GET_GAME_STATE (SPATHI_CREATURES_ELIMINATED))
		{
			SET_GAME_STATE (LIED_ABOUT_CREATURES, 2);
		}
		else
		{
			SET_GAME_STATE (SPATHI_HOME_VISITS, 0);
			SET_GAME_STATE (SPATHI_VISITS, 0);
			SET_GAME_STATE (SPATHI_PARTY, 1);
			SET_GAME_STATE (SPATHI_MANNER, 3);
		}
	}
	else if (PLAYER_SAID (R, bye_before_party))
	{
		NPCPhrase (GOODBYE_BEFORE_PARTY);
	}
	else if (PLAYER_SAID (R, bye_from_party_1)
		   || PLAYER_SAID (R, bye_from_party_2)
		   || PLAYER_SAID (R, bye_from_party_3))
	{
		NPCPhrase (GOODBYE_FROM_PARTY);
	}
}
示例#20
0
static void
Intro (void)
{
	BYTE NumVisits;

	if (GET_GAME_STATE (PROBE_ILWRATH_ENCOUNTER))
	{
		NPCPhrase (SEND_MESSAGE);

		Response (where_you_come_from, CombatIsInevitable);
		Response (it_will_be_a_pleasure, CombatIsInevitable);
		Response (surrender, CombatIsInevitable);
		Response (be_reasonable, CombatIsInevitable);
	}
	else if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
	{
		IlwrathHome ((RESPONSE_REF)0);
	}
	else if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 6))
	{
		NumVisits = GET_GAME_STATE (ILWRATH_CHMMR_VISITS);
		switch (NumVisits++)
		{
			case 0:
				NPCPhrase (INIT_CHMMR_HELLO);
				break;
			case 1:
				NPCPhrase (SUBSEQUENT_CHMMR_HELLO);
				--NumVisits;
				break;
		}
		SET_GAME_STATE (ILWRATH_CHMMR_VISITS, NumVisits);

		Response (whats_up, CombatIsInevitable);
		Response (bye, CombatIsInevitable);
	}
	else if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 5))
	{
		// Communicating with an Ilwrath ship using a HyperWave Broadcaster.
		if (GET_GAME_STATE (ILWRATH_FIGHT_THRADDASH))
			NPCPhrase (BIG_FUN);
		else if (GET_GAME_STATE (ILWRATH_DECEIVED))
			NPCPhrase (FAST_AS_CAN);
		else
			NPCPhrase (JUST_GRUNTS);

		setSegue (Segue_peace);
	}
	else if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 4))
	{
		// Communicating with the Ilwrath homeworld using a
		// Hyperwave Broadcaster.
		GodsSpeak ((RESPONSE_REF)0);
	}
	else
	{
		setSegue (Segue_peace);

		if (GET_GAME_STATE (ILWRATH_FIGHT_THRADDASH))
			NPCPhrase (HAPPY_FIGHTING_THRADDASH);
		else if (GET_GAME_STATE (ILWRATH_DECEIVED))
			NPCPhrase (ON_WAY_TO_THRADDASH);
		else
			IlwrathSpace ((RESPONSE_REF)0);
	}
}
示例#21
0
文件: melnorm.c 项目: intgr/sc2-uqm
static void
ExitConversation (RESPONSE_REF R)
{
	if (PLAYER_SAID (R, no_trade_now))
		NPCPhrase (OK_NO_TRADE_NOW_BYE);
	else if (PLAYER_SAID (R, youre_on))
	{
		NPCPhrase (YOU_GIVE_US_NO_CHOICE);

		SET_GAME_STATE (MELNORME_ANGER, 1);
		setSegue (Segue_hostile);
	}
	else if (PLAYER_SAID (R, so_we_can_attack))
	{
		NPCPhrase (DECEITFUL_HUMAN);

		SET_GAME_STATE (MELNORME_ANGER, 2);
		setSegue (Segue_hostile);
	}
	else if (PLAYER_SAID (R, bye_melnorme_slightly_angry))
		NPCPhrase (MELNORME_SLIGHTLY_ANGRY_GOODBYE);
	else if (PLAYER_SAID (R, ok_strip_me))
	{
		if (ShipWorth () < 4000 / MODULE_COST_SCALE)
				/* is ship worth stripping */
			NPCPhrase (NOT_WORTH_STRIPPING);
		else
		{
			SET_GAME_STATE (MELNORME_ANGER, 0);

			StripShip ((COUNT)~0);
			NPCPhrase (FAIR_JUSTICE);
		}
	}
	else if (PLAYER_SAID (R, fight_some_more))
	{
		NPCPhrase (OK_FIGHT_SOME_MORE);

		SET_GAME_STATE (MELNORME_ANGER, 3);
		setSegue (Segue_hostile);
	}
	else if (PLAYER_SAID (R, bye_melnorme_pissed_off))
		NPCPhrase (MELNORME_PISSED_OFF_GOODBYE);
	else if (PLAYER_SAID (R, well_if_thats_the_way_you_feel))
	{
		NPCPhrase (WE_FIGHT_AGAIN);

		setSegue (Segue_hostile);
	}
	else if (PLAYER_SAID (R, you_hate_us_so_we_go_away))
		NPCPhrase (HATE_YOU_GOODBYE);
	else if (PLAYER_SAID (R, take_it))
	{
		StripShip (0);
		NPCPhrase (HAPPY_TO_HAVE_RESCUED);
	}
	else if (PLAYER_SAID (R, leave_it))
	{
		SET_GAME_STATE (MELNORME_RESCUE_REFUSED, 1);
		NPCPhrase (MAYBE_SEE_YOU_LATER);
	}
	else if (PLAYER_SAID (R, no_help))
	{
		SET_GAME_STATE (MELNORME_RESCUE_REFUSED, 1);
		NPCPhrase (GOODBYE_AND_GOODLUCK);
	}
	else if (PLAYER_SAID (R, no_changed_mind))
	{
		NPCPhrase (GOODBYE_AND_GOODLUCK_AGAIN);
	}
	else if (PLAYER_SAID (R, be_leaving_now)
			|| PLAYER_SAID (R, goodbye))
	{
		NPCPhrase (FRIENDLY_GOODBYE);
	}
}
示例#22
0
文件: spahome.c 项目: intgr/sc2-uqm
static void
Intro (void)
{
	BYTE Manner;

	Manner = GET_GAME_STATE (SPATHI_MANNER);
	if (Manner == 2)
	{
		NPCPhrase (HATE_YOU_FOREVER);
		setSegue (Segue_hostile);
	}
	else if (Manner == 1
			&& GET_GAME_STATE (KNOW_SPATHI_PASSWORD)
			&& (GET_GAME_STATE (FOUND_PLUTO_SPATHI)
			|| GET_GAME_STATE (SPATHI_HOME_VISITS) != 7))
	{
		SpathiAngry ((RESPONSE_REF)0);
	}
	else if (CheckAlliance (SPATHI_SHIP) == GOOD_GUY)
	{
		CommData.AlienColorMap =
				SetAbsColorMapIndex (CommData.AlienColorMap, 1);
		SpathiAllies ((RESPONSE_REF)0);
	}
	else if (GET_GAME_STATE (SPATHI_PARTY))
	{
		CommData.AlienColorMap =
				SetAbsColorMapIndex (CommData.AlienColorMap, 1);
		SpathiParty ((RESPONSE_REF)0);
	}
	else if (GET_GAME_STATE (SPATHI_QUEST))
	{
		if (GET_GAME_STATE (LIED_ABOUT_CREATURES) < 2)
		{
			CommData.AlienColorMap =
					SetAbsColorMapIndex (CommData.AlienColorMap, 1);
			SpathiQuest ((RESPONSE_REF)0);
		}
		else
		{
			NPCPhrase (YOU_LIED_2);

			SET_GAME_STATE (SPATHI_MANNER, 2);
			setSegue (Segue_hostile);
		}
	}
	else if (GET_GAME_STATE (KNOW_SPATHI_QUEST))
	{
		CommData.AlienColorMap =
				SetAbsColorMapIndex (CommData.AlienColorMap, 1);
		LearnQuest ((RESPONSE_REF)0);
	}
	else if (GET_GAME_STATE (KNOW_SPATHI_PASSWORD)
			&& (GET_GAME_STATE (FOUND_PLUTO_SPATHI)
			|| GET_GAME_STATE (SPATHI_HOME_VISITS) != 7))
	{
		CommData.AlienColorMap =
				SetAbsColorMapIndex (CommData.AlienColorMap, 1);
		SpathiCouncil ((RESPONSE_REF)0);
	}
	else
	{
		SpathiPassword ((RESPONSE_REF)0);
	}
}
示例#23
0
文件: zoqfotc.c 项目: njvack/uqm-ios
static void
Intro (void)
{
	BYTE NumVisits;

	if (LOBYTE (GLOBAL (CurrentActivity)) == WON_LAST_BATTLE)
	{
		NPCPhrase_cb (OUT_TAKES0, &SelectAlienZOQ);
		NPCPhrase_cb (OUT_TAKES1, &SelectAlienPIK);
		NPCPhrase_cb (OUT_TAKES2, &SelectAlienZOQ);
		NPCPhrase_cb (OUT_TAKES3, &SelectAlienPIK);
		NPCPhrase_cb (OUT_TAKES4, &SelectAlienZOQ);
		NPCPhrase_cb (OUT_TAKES5, &SelectAlienPIK);
		NPCPhrase_cb (OUT_TAKES6, &SelectAlienZOQ);
		NPCPhrase_cb (OUT_TAKES7, &SelectAlienPIK);
		NPCPhrase_cb (OUT_TAKES8, &SelectAlienZOQ);
		NPCPhrase_cb (OUT_TAKES9, &SelectAlienPIK);
		NPCPhrase_cb (OUT_TAKES10, &SelectAlienZOQ);
		NPCPhrase_cb (OUT_TAKES11, &SelectAlienPIK);
		NPCPhrase_cb (OUT_TAKES12, &SelectAlienZOQ);
		NPCPhrase_cb (OUT_TAKES13, &SelectAlienPIK);
		ZFPTalkSegue ((COUNT)~0);
		setSegue (Segue_peace);
		return;
	}

	if (GET_GAME_STATE (ZOQFOT_HOSTILE))
	{
		NumVisits = GET_GAME_STATE (ZOQFOT_HOME_VISITS);
		switch (NumVisits++)
		{
			case 0:
				NPCPhrase_cb (HOSTILE_HELLO_10, &SelectAlienZOQ);
				NPCPhrase_cb (HOSTILE_HELLO_11, &SelectAlienPIK);
				ZFPTalkSegue ((COUNT)~0);
				break;
			case 1:
				NPCPhrase_cb (HOSTILE_HELLO_20, &SelectAlienZOQ);
				NPCPhrase_cb (HOSTILE_HELLO_21, &SelectAlienPIK);
				NPCPhrase_cb (HOSTILE_HELLO_22, &SelectAlienZOQ);
				NPCPhrase_cb (HOSTILE_HELLO_23, &SelectAlienPIK);
				NPCPhrase_cb (HOSTILE_HELLO_24, &SelectAlienZOQ);
				NPCPhrase_cb (HOSTILE_HELLO_25, &SelectAlienPIK);
				ZFPTalkSegue ((COUNT)~0);
				break;
			case 2:
				NPCPhrase_cb (HOSTILE_HELLO_30, &SelectAlienZOQ);
				NPCPhrase_cb (HOSTILE_HELLO_31, &SelectAlienPIK);
				ZFPTalkSegue ((COUNT)~0);
				break;
			case 3:
				NPCPhrase_cb (HOSTILE_HELLO_40, &SelectAlienZOQ);
				NPCPhrase_cb (HOSTILE_HELLO_41, &SelectAlienPIK);
				ZFPTalkSegue ((COUNT)~0);
				--NumVisits;
				break;
		}
		SET_GAME_STATE (ZOQFOT_HOME_VISITS, NumVisits);

		setSegue (Segue_hostile);
	}
	else if (!GET_GAME_STATE (MET_ZOQFOT))
	{
		SET_GAME_STATE (MET_ZOQFOT, 1);

		NPCPhrase_cb (WE_ARE0, &SelectAlienZOQ);
		NPCPhrase_cb (WE_ARE1, &SelectAlienPIK);
		NPCPhrase_cb (WE_ARE2, &SelectAlienZOQ);
		NPCPhrase_cb (WE_ARE3, &SelectAlienPIK);
		NPCPhrase_cb (WE_ARE4, &SelectAlienZOQ);
		NPCPhrase_cb (WE_ARE5, &SelectAlienPIK);
		NPCPhrase_cb (WE_ARE6, &SelectAlienZOQ);
		NPCPhrase_cb (WE_ARE7, &SelectAlienPIK);

		if (GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 7))
		{
			NPCPhrase_cb (INIT_HOME_HELLO0, &SelectAlienZOQ);
			NPCPhrase_cb (INIT_HOME_HELLO1, &SelectAlienPIK);
			NPCPhrase_cb (INIT_HOME_HELLO2, &SelectAlienZOQ);
			NPCPhrase_cb (INIT_HOME_HELLO3, &SelectAlienPIK);
		}
		else
		{
			NPCPhrase_cb (SCOUT_HELLO0, &SelectAlienZOQ);
			NPCPhrase_cb (SCOUT_HELLO1, &SelectAlienPIK);
			NPCPhrase_cb (SCOUT_HELLO2, &SelectAlienZOQ);
			NPCPhrase_cb (SCOUT_HELLO3, &SelectAlienPIK);
		}

		ZFPTalkSegue ((COUNT)~0);

		AquaintZoqFot (0);
	}
	else
	{
		if (GET_GAME_STATE (ZOQFOT_DISTRESS))
		{
#define MAX_ZFP_SHIPS 4
			NPCPhrase_cb (THANKS_FOR_RESCUE0, &SelectAlienZOQ);
			NPCPhrase_cb (THANKS_FOR_RESCUE1, &SelectAlienPIK);
			NPCPhrase_cb (THANKS_FOR_RESCUE2, &SelectAlienZOQ);
			NPCPhrase_cb (THANKS_FOR_RESCUE3, &SelectAlienPIK);
			NPCPhrase_cb (THANKS_FOR_RESCUE4, &SelectAlienZOQ);
			NPCPhrase_cb (THANKS_FOR_RESCUE5, &SelectAlienPIK);
			NPCPhrase_cb (THANKS_FOR_RESCUE6, &SelectAlienZOQ);
			NPCPhrase_cb (THANKS_FOR_RESCUE7, &SelectAlienPIK);
			NPCPhrase_cb (THANKS_FOR_RESCUE8, &SelectAlienZOQ);
			NPCPhrase_cb (THANKS_FOR_RESCUE9, &SelectAlienPIK);
			NPCPhrase_cb (THANKS_FOR_RESCUE10, &SelectAlienZOQ);
			NPCPhrase_cb (THANKS_FOR_RESCUE11, &SelectAlienPIK);
			ZFPTalkSegue ((COUNT)~0);

			SET_GAME_STATE (ZOQFOT_DISTRESS, 0);
			AddEscortShips (ZOQFOTPIK_SHIP, MAX_ZFP_SHIPS);
		}
		else
		{
			NumVisits = GET_GAME_STATE (ZOQFOT_HOME_VISITS);
			if (CheckAlliance (ZOQFOTPIK_SHIP) != GOOD_GUY)
			{
				switch (NumVisits++)
				{
					case 0:
						NPCPhrase_cb (NEUTRAL_HOME_HELLO_10, &SelectAlienZOQ);
						NPCPhrase_cb (NEUTRAL_HOME_HELLO_11, &SelectAlienPIK);
						NPCPhrase_cb (NEUTRAL_HOME_HELLO_12, &SelectAlienZOQ);
						NPCPhrase_cb (NEUTRAL_HOME_HELLO_13, &SelectAlienPIK);
						break;
					case 1:
						NPCPhrase_cb (NEUTRAL_HOME_HELLO_20, &SelectAlienZOQ);
						NPCPhrase_cb (NEUTRAL_HOME_HELLO_21, &SelectAlienPIK);
						NPCPhrase_cb (NEUTRAL_HOME_HELLO_22, &SelectAlienZOQ);
						NPCPhrase_cb (NEUTRAL_HOME_HELLO_23, &SelectAlienPIK);
						--NumVisits;
						break;
				}
				ZFPTalkSegue ((COUNT)~0);
			}
			else
			{
				switch (NumVisits++)
				{
					case 0:
						NPCPhrase_cb (ALLIED_HOME_HELLO_10, &SelectAlienZOQ);
						NPCPhrase_cb (ALLIED_HOME_HELLO_11, &SelectAlienPIK);
						NPCPhrase_cb (ALLIED_HOME_HELLO_12, &SelectAlienZOQ);
						NPCPhrase_cb (ALLIED_HOME_HELLO_13, &SelectAlienPIK);
						ZFPTalkSegue ((COUNT)~0);
						break;
					case 1:
						NPCPhrase_cb (ALLIED_HOME_HELLO_20, &SelectAlienZOQ);
						NPCPhrase_cb (ALLIED_HOME_HELLO_21, &SelectAlienPIK);
						NPCPhrase_cb (ALLIED_HOME_HELLO_22, &SelectAlienZOQ);
						NPCPhrase_cb (ALLIED_HOME_HELLO_23, &SelectAlienPIK);
						NPCPhrase_cb (ALLIED_HOME_HELLO_24, &SelectAlienZOQ);
						NPCPhrase_cb (ALLIED_HOME_HELLO_25, &SelectAlienPIK);
						NPCPhrase_cb (ALLIED_HOME_HELLO_26, &SelectAlienZOQ);
						NPCPhrase_cb (ALLIED_HOME_HELLO_27, &SelectAlienPIK);
						ZFPTalkSegue ((COUNT)~0);
						break;
					case 2:
						NPCPhrase_cb (ALLIED_HOME_HELLO_30, &SelectAlienZOQ);
						NPCPhrase_cb (ALLIED_HOME_HELLO_31, &SelectAlienPIK);
						ZFPTalkSegue ((COUNT)~0);
						break;
					case 3:
						NPCPhrase_cb (ALLIED_HOME_HELLO_40, &SelectAlienZOQ);
						NPCPhrase_cb (ALLIED_HOME_HELLO_41, &SelectAlienPIK);
						ZFPTalkSegue ((COUNT)~0);
						--NumVisits;
						break;
				}
			}
			SET_GAME_STATE (ZOQFOT_HOME_VISITS, NumVisits);
		}

		ZoqFotHome (0);
	}
}
示例#24
0
文件: zoqfotc.c 项目: njvack/uqm-ios
static void
ExitConversation (RESPONSE_REF R)
{
	setSegue (Segue_peace);

	if (PLAYER_SAID (R, bye_homeworld))
	{
		NPCPhrase_cb (GOODBYE_HOME0, &SelectAlienZOQ);
		NPCPhrase_cb (GOODBYE_HOME1, &SelectAlienPIK);
		ZFPTalkSegue ((COUNT)~0);
	}
	else if (PLAYER_SAID (R, decide_later))
	{
		NPCPhrase_cb (PLEASE_HURRY0, &SelectAlienZOQ);
		NPCPhrase_cb (PLEASE_HURRY1, &SelectAlienPIK);
		ZFPTalkSegue ((COUNT)~0);
	}
	else if (PLAYER_SAID (R, valuable_info))
	{
		NPCPhrase_cb (GOODBYE0, &SelectAlienZOQ);
		NPCPhrase_cb (GOODBYE1, &SelectAlienPIK);
		NPCPhrase_cb (GOODBYE2, &SelectAlienZOQ);
		NPCPhrase_cb (GOODBYE3, &SelectAlienPIK);
		ZFPTalkSegue ((COUNT)~0);
	}
	else if (PLAYER_SAID (R, how_can_i_help))
	{
		NPCPhrase_cb (EMMISSARIES0, &SelectAlienZOQ);
		NPCPhrase_cb (EMMISSARIES1, &SelectAlienPIK);
		NPCPhrase_cb (EMMISSARIES2, &SelectAlienZOQ);
		NPCPhrase_cb (EMMISSARIES3, &SelectAlienPIK);
		NPCPhrase_cb (EMMISSARIES4, &SelectAlienZOQ);
		NPCPhrase_cb (EMMISSARIES5, &SelectAlienPIK);
		NPCPhrase_cb (EMMISSARIES6, &SelectAlienZOQ);
		NPCPhrase_cb (EMMISSARIES7, &SelectAlienPIK);
		ZFPTalkSegue ((COUNT)~0);
	}
	else if (PLAYER_SAID (R, sure))
	{
		NPCPhrase_cb (WE_ALLY0, &SelectAlienZOQ);
		NPCPhrase_cb (WE_ALLY1, &SelectAlienPIK);
		NPCPhrase_cb (WE_ALLY2, &SelectAlienZOQ);
		NPCPhrase_cb (WE_ALLY3, &SelectAlienPIK);
		NPCPhrase_cb (WE_ALLY4, &SelectAlienZOQ);
		NPCPhrase_cb (WE_ALLY5, &SelectAlienPIK);
		ZFPTalkSegue ((COUNT)~0);
		SetRaceAllied (ZOQFOTPIK_SHIP, TRUE);
		AddEvent (RELATIVE_EVENT, 3, 0, 0, ZOQFOT_DISTRESS_EVENT);
		SET_GAME_STATE (ZOQFOT_HOME_VISITS, 0);
	}
	else if (PLAYER_SAID (R, all_very_interesting))
	{
		NPCPhrase_cb (SEE_TOLD_YOU0, &SelectAlienZOQ);
		NPCPhrase_cb (SEE_TOLD_YOU1, &SelectAlienPIK);
		NPCPhrase_cb (SEE_TOLD_YOU2, &SelectAlienZOQ);
		NPCPhrase_cb (SEE_TOLD_YOU3, &SelectAlienPIK);
		ZFPTalkSegue ((COUNT)~0);

		SET_GAME_STATE (ZOQFOT_HOSTILE, 1);
		SET_GAME_STATE (ZOQFOT_HOME_VISITS, 0);
		setSegue (Segue_hostile);
	}
	else if (PLAYER_SAID (R, never))
	{
		NPCPhrase_cb (WE_ENEMIES0, &SelectAlienZOQ);
		NPCPhrase_cb (WE_ENEMIES1, &SelectAlienPIK);
		ZFPTalkSegue ((COUNT)~0);

		SET_GAME_STATE (ZOQFOT_HOME_VISITS, 0);
		SET_GAME_STATE (ZOQFOT_HOSTILE, 1);
		setSegue (Segue_hostile);
	}
}
示例#25
0
static void
ExitConversation (RESPONSE_REF R)
{
	setSegue (Segue_hostile);

	if (PLAYER_SAID (R, bye0))
	{
		NPCPhrase (GOODBYE);

		setSegue (Segue_peace);
	}
	else if (PLAYER_SAID (R, go_ahead))
	{
		NPCPhrase (ON_SECOND_THOUGHT);

		setSegue (Segue_peace);
	}
	else if (PLAYER_SAID (R, need_you_for_duty))
	{
		NPCPhrase (OK_WILL_BE_SENTRY);

		setSegue (Segue_peace);
	}
	else if (PLAYER_SAID (R, females)
			|| PLAYER_SAID (R, nubiles)
			|| PLAYER_SAID (R, rat_babes))
	{
		NPCPhrase (LEAPING_HAPPINESS);

		SET_GAME_STATE (SHOFIXTI_RECRUITED, 1);
		SET_GAME_STATE (MAIDENS_ON_SHIP, 0);
		setSegue (Segue_peace);

		AddEvent (RELATIVE_EVENT, 2, 0, 0, SHOFIXTI_RETURN_EVENT);
	}
	else if (PLAYER_SAID (R, dont_attack))
	{
		NPCPhrase (TYPICAL_PLOY);

		SET_GAME_STATE (SHOFIXTI_STACK1, 1);
	}
	else if (PLAYER_SAID (R, hey_stop))
	{
		NPCPhrase (ONLY_STOP);

		SET_GAME_STATE (SHOFIXTI_STACK1, 2);
	}
	else if (PLAYER_SAID (R, look_you_are))
	{
		NPCPhrase (TOO_BAD);

		SET_GAME_STATE (SHOFIXTI_STACK1, 3);
	}
	else if (PLAYER_SAID (R, no_one_insults))
	{
		NPCPhrase (YOU_LIMP);

		SET_GAME_STATE (SHOFIXTI_STACK2, 1);
	}
	else if (PLAYER_SAID (R, mighty_words))
	{
		NPCPhrase (HANG_YOUR);

		SET_GAME_STATE (SHOFIXTI_STACK2, 2);
	}
	else if (PLAYER_SAID (R, dont_know))
	{
		NPCPhrase (NEVER);

		SET_GAME_STATE (SHOFIXTI_STACK3, 1);
	}
	else if (PLAYER_SAID (R, look0))
	{
		NPCPhrase (FOR_YOU);

		SET_GAME_STATE (SHOFIXTI_STACK3, 2);
	}
	else if (PLAYER_SAID (R, no_bloodshed))
	{
		NPCPhrase (YES_BLOODSHED);

		SET_GAME_STATE (SHOFIXTI_STACK3, 3);
	}
	else if (PLAYER_SAID (R, dont_want_to_fight))
	{
		BYTE NumVisits;

		NumVisits = GET_GAME_STATE (SHOFIXTI_STACK4);
		switch (NumVisits++)
		{
			case 0:
				NPCPhrase (MUST_FIGHT_YOU_URQUAN_1);
				break;
			case 1:
				NPCPhrase (MUST_FIGHT_YOU_URQUAN_2);
				break;
			case 2:
				NPCPhrase (MUST_FIGHT_YOU_URQUAN_3);
				break;
			case 3:
				NPCPhrase (MUST_FIGHT_YOU_URQUAN_4);
				--NumVisits;
				break;
		}
		SET_GAME_STATE (SHOFIXTI_STACK4, NumVisits);
	}
}
示例#26
0
static void
ExitConversation (RESPONSE_REF R)
{
    setSegue (Segue_peace);

    if (PLAYER_SAID (R, bye_ally))
        NPCPhrase (GOODBYE_ALLY);
    else if (PLAYER_SAID (R, bye_neutral))
        NPCPhrase (GOODBYE_NEUTRAL);
    else if (PLAYER_SAID (R, bye_angry))
        NPCPhrase (GOODBYE_ANGRY);
    else if (PLAYER_SAID (R, bye_taalo))
    {
        if (GET_GAME_STATE (ORZ_MANNER) == 1)
            NPCPhrase (ANGRY_TAALO_GOODBYE);
        else
            NPCPhrase (FRIENDLY_TAALO_GOODBYE);
    }
    else if (PLAYER_SAID (R, hostile_2))
    {
        NPCPhrase (HOSTILITY_IS_BAD_2);

        setSegue (Segue_hostile);
    }
    else if (PLAYER_SAID (R, may_we_land))
    {
        NPCPhrase (SURE_LAND);

        SET_GAME_STATE (TAALO_UNPROTECTED, 1);
    }
    else if (PLAYER_SAID (R, yes_alliance)
             || PLAYER_SAID (R, were_sorry))
    {
        if (PLAYER_SAID (R, yes_alliance))
            NPCPhrase (GREAT);
        else
            NPCPhrase (APOLOGY_ACCEPTED);

        SET_GAME_STATE (ORZ_ANDRO_STATE, 0);
        SET_GAME_STATE (ORZ_GENERAL_INFO, 0);
        SET_GAME_STATE (ORZ_PERSONAL_INFO, 0);
        SET_GAME_STATE (ORZ_MANNER, 3);
        SetRaceAllied (ORZ_SHIP, TRUE);
    }
    else if (PLAYER_SAID (R, demand_to_land))
    {
        NPCPhrase (NO_DEMAND);

        setSegue (Segue_hostile);
    }
    else if (PLAYER_SAID (R, about_andro_3)
             || PLAYER_SAID (R, must_know_about_androsyn))
    {
        if (PLAYER_SAID (R, about_andro_3))
            NPCPhrase (BLEW_IT);
        else
            NPCPhrase (KNOW_TOO_MUCH);

        SET_GAME_STATE (ORZ_VISITS, 0);
        SET_GAME_STATE (ORZ_MANNER, 2);
        setSegue (Segue_hostile);
        if (PLAYER_SAID (R, about_andro_3))
        {
            SetRaceAllied (ORZ_SHIP, FALSE);
            RemoveEscortShips (ORZ_SHIP);
        }

        XFormColorMap (GetColorMapAddress (
                           SetAbsColorMapIndex (CommData.AlienColorMap, 1)
                       ), ONE_SECOND / 2);
    }
    else /* insults */
    {
        BYTE NumVisits;

        NumVisits = GET_GAME_STATE (ORZ_PERSONAL_INFO);
        switch (NumVisits++)
        {
        case 0:
            NPCPhrase (INSULTED_1);
            break;
        case 1:
            NPCPhrase (INSULTED_2);
            break;
        case 2:
            NPCPhrase (INSULTED_3);
            setSegue (Segue_hostile);
            break;
        case 7:
            --NumVisits;
        default:
            NPCPhrase (INSULTED_4);
            setSegue (Segue_hostile);
            break;
        }
        SET_GAME_STATE (ORZ_PERSONAL_INFO, NumVisits);
    }
}
示例#27
0
文件: utwigc.c 项目: njvack/uqm-ios
static void
NeutralUtwig (RESPONSE_REF R)
{
	BYTE i, LastStack;
	RESPONSE_REF pStr[4];

	LastStack = 0;
	pStr[0] = pStr[1] = pStr[2] = pStr[3] = 0;
	if (PLAYER_SAID (R, we_are_vindicator0))
	{
		NPCPhrase (WOULD_BE_HAPPY_BUT);

		SET_GAME_STATE (UTWIG_STACK1, 1);
	}
	else if (PLAYER_SAID (R, why_sad))
	{
		NPCPhrase (ULTRON_BROKE);

		SET_GAME_STATE (UTWIG_STACK1, 2);
	}
	else if (PLAYER_SAID (R, what_ultron))
	{
		NPCPhrase (GLORIOUS_ULTRON);

		SET_GAME_STATE (UTWIG_STACK1, 3);
	}
	else if (PLAYER_SAID (R, dont_be_babies))
	{
		NPCPhrase (MOCK_OUR_PAIN);

		setSegue (Segue_hostile);
		SET_GAME_STATE (UTWIG_STACK1, 4);
		SET_GAME_STATE (UTWIG_HOSTILE, 1);
		SET_GAME_STATE (UTWIG_INFO, 0);
		SET_GAME_STATE (UTWIG_HOME_VISITS, 0);
		SET_GAME_STATE (UTWIG_VISITS, 0);
		SET_GAME_STATE (BOMB_VISITS, 0);
		return;
	}
	else if (PLAYER_SAID (R, real_sorry_about_ultron))
	{
		NPCPhrase (APPRECIATE_SYMPATHY);

		SET_GAME_STATE (UTWIG_STACK1, 4);
		return;
	}
	else if (PLAYER_SAID (R, what_about_you_1))
	{
		NPCPhrase (ABOUT_US_1);

		LastStack = 2;
		SET_GAME_STATE (UTWIG_WAR_NEWS, 1);
	}
	else if (PLAYER_SAID (R, what_about_you_2))
	{
		NPCPhrase (ABOUT_US_2);

		LastStack = 2;
		StartSphereTracking (SUPOX_SHIP);
		SET_GAME_STATE (UTWIG_WAR_NEWS, 2);
	}
	else if (PLAYER_SAID (R, what_about_you_3))
	{
		NPCPhrase (ABOUT_US_3);
		
		SET_GAME_STATE (UTWIG_WAR_NEWS, 3);
	}
	else if (PLAYER_SAID (R, what_about_urquan_1))
	{
		NPCPhrase (ABOUT_URQUAN_1);

		LastStack = 3;
		SET_GAME_STATE (UTWIG_STACK2, 1);
	}
	else if (PLAYER_SAID (R, what_about_urquan_2))
	{
		NPCPhrase (ABOUT_URQUAN_2);

		SET_GAME_STATE (UTWIG_STACK2, 2);
	}

	switch (GET_GAME_STATE (UTWIG_STACK1))
	{
		case 0:
			{
				UNICODE buf[ALLIANCE_NAME_BUFSIZE];

				GetAllianceName (buf, name_1);
				construct_response (
						shared_phrase_buf,
						we_are_vindicator0,
						GLOBAL_SIS (CommanderName),
						we_are_vindicator1,
						buf,
						we_are_vindicator2,
						(UNICODE*)NULL);
			}
			pStr[0] = we_are_vindicator0;
			break;
		case 1:
			pStr[0] = why_sad;
			break;
		case 2:
			pStr[0] = what_ultron;
			break;
		case 3:
			pStr[0] = dont_be_babies;
			pStr[1] = real_sorry_about_ultron;
			break;
	}
	switch (GET_GAME_STATE (UTWIG_WAR_NEWS))
	{
		case 0:
			pStr[2] = what_about_you_1;
			break;
		case 1:
			pStr[2] = what_about_you_2;
			break;
		case 2:
			pStr[2] = what_about_you_3;
			break;
	}
	switch (GET_GAME_STATE (UTWIG_STACK2))
	{
		case 0:
			pStr[2] = what_about_urquan_1;
			break;
		case 1:
			pStr[2] = what_about_urquan_2;
			break;
	}

	if (pStr[LastStack])
	{
		if (pStr[LastStack] != we_are_vindicator0)
			Response (pStr[LastStack], NeutralUtwig);
		else
			DoResponsePhrase (pStr[LastStack], NeutralUtwig, shared_phrase_buf);
	}
	for (i = 0; i < 4; ++i)
	{
		if (i != LastStack && pStr[i])
		{
			if (pStr[i] != we_are_vindicator0)
				Response (pStr[i], NeutralUtwig);
			else
				DoResponsePhrase (pStr[i], NeutralUtwig, shared_phrase_buf);
		}
	}
	if (GET_GAME_STATE (ULTRON_CONDITION))
		Response (got_ultron, ExitConversation);
	Response (bye_neutral, ExitConversation);
}
示例#28
0
static void
CombatIsInevitable (RESPONSE_REF R)
{
	setSegue (Segue_hostile);

	if (PLAYER_SAID (R, you_are_weak))
		NPCPhrase (STRENGTH_NOT_ALL);
	else if (PLAYER_SAID (R, slay_by_thousands))
		NPCPhrase (NO_SLAY_BY_THOUSANDS);
	else if (PLAYER_SAID (R, ease_up))
		NPCPhrase (NO_EASE_UP);
	else if (PLAYER_SAID (R, bye_space))
		NPCPhrase (GOODBYE_AND_DIE_SPACE);
	else if (PLAYER_SAID (R, bye_homeworld))
		NPCPhrase (GOODBYE_AND_DIE_HOMEWORLD);
	else if (PLAYER_SAID (R, want_peace))
		NPCPhrase (NO_PEACE);
	else if (PLAYER_SAID (R, want_alliance))
		NPCPhrase (NO_ALLIANCE);
	else if (PLAYER_SAID (R, but_evil_is_defined))
		NPCPhrase (DONT_CONFUSE_US);
	else if (PLAYER_SAID (R, bye_gods))
	{
		NPCPhrase (GOODBYE_GODS);

		setSegue (Segue_peace);
	}
	if (PLAYER_SAID (R, whats_up))
	{
		NPCPhrase (GENERAL_INFO);
		Response (bye, CombatIsInevitable);
	}
	else if (PLAYER_SAID (R, whats_up_space_1)
			|| PLAYER_SAID (R, whats_up_space_2)
			|| PLAYER_SAID (R, whats_up_space_3)
			|| PLAYER_SAID (R, whats_up_space_4)
			|| PLAYER_SAID (R, whats_up_space_5))
	{
		BYTE NumVisits;

		NumVisits = GET_GAME_STATE (ILWRATH_INFO);
		switch (NumVisits++)
		{
			case 0:
				NPCPhrase (GENERAL_INFO_SPACE_1);
				break;
			case 1:
				NPCPhrase (GENERAL_INFO_SPACE_2);
				break;
			case 2:
				NPCPhrase (GENERAL_INFO_SPACE_3);
				break;
			case 3:
				NPCPhrase (GENERAL_INFO_SPACE_4);
				break;
			case 4:
				NPCPhrase (GENERAL_INFO_SPACE_5);
				--NumVisits;
				break;
		}
		SET_GAME_STATE (ILWRATH_INFO, NumVisits);
	}
	else
	{
		if (PLAYER_SAID (R, bye))
			NPCPhrase (GOODBYE_AND_DIE);
		else if (PLAYER_SAID (R, where_you_come_from))
			NPCPhrase (CAME_FROM);
		if (PLAYER_SAID (R, it_will_be_a_pleasure))
			NPCPhrase (WHO_BLASTS_WHO);
		if (PLAYER_SAID (R, surrender))
			NPCPhrase (NO_SURRENDER);
		if (PLAYER_SAID (R, be_reasonable))
			NPCPhrase (NOT_REASONABLE);
	}
}
示例#29
0
文件: utwigc.c 项目: njvack/uqm-ios
static void
BombWorld (RESPONSE_REF R)
{
	BYTE LastStack;
	RESPONSE_REF pStr[2];

	LastStack = 0;
	pStr[0] = pStr[1] = 0;
	if (PLAYER_SAID (R, why_you_here))
	{
		NPCPhrase (WE_GUARD_BOMB);

		SET_GAME_STATE (BOMB_STACK1, 1);
	}
	else if (PLAYER_SAID (R, what_about_bomb))
	{
		NPCPhrase (ABOUT_BOMB);

		SET_GAME_STATE (BOMB_STACK1, 2);
	}
	else if (PLAYER_SAID (R, give_us_bomb_or_die))
	{
		NPCPhrase (GUARDS_WARN);

		SET_GAME_STATE (BOMB_STACK1, 3);
	}
	else if (PLAYER_SAID (R, demand_bomb))
	{
		NPCPhrase (GUARDS_FIGHT);

		setSegue (Segue_hostile);
		SET_GAME_STATE (UTWIG_HOSTILE, 1);
		SET_GAME_STATE (UTWIG_INFO, 0);
		SET_GAME_STATE (UTWIG_HOME_VISITS, 0);
		SET_GAME_STATE (UTWIG_VISITS, 0);
		SET_GAME_STATE (BOMB_VISITS, 0);
		return;
	}
	else if (PLAYER_SAID (R, may_we_have_bomb))
	{
		NPCPhrase (NO_BOMB);

		LastStack = 1;
		SET_GAME_STATE (BOMB_STACK2, 1);
	}
	else if (PLAYER_SAID (R, please))
	{
		NPCPhrase (SORRY_NO_BOMB);

		SET_GAME_STATE (BOMB_STACK2, 2);
	}
	else if (PLAYER_SAID (R, whats_up_bomb))
	{
		if (GET_GAME_STATE (BOMB_INFO))
			NPCPhrase (GENERAL_INFO_BOMB_2);
		else
		{
			NPCPhrase (GENERAL_INFO_BOMB_1);

			SET_GAME_STATE (BOMB_INFO, 1);
		}

		DISABLE_PHRASE (whats_up_bomb);
	}

	switch (GET_GAME_STATE (BOMB_STACK2))
	{
		case 0:
			pStr[1] = may_we_have_bomb;
			break;
		case 1:
			pStr[1] = please;
			break;
	}
	switch (GET_GAME_STATE (BOMB_STACK1))
	{
		case 0:
			pStr[0] = why_you_here;
			pStr[1] = 0;
			break;
		case 1:
			pStr[0] = what_about_bomb;
			pStr[1] = 0;
			break;
		case 2:
			pStr[0] = give_us_bomb_or_die;
			break;
		case 3:
			pStr[0] = demand_bomb;
			break;
	}

	if (pStr[LastStack])
		Response (pStr[LastStack], BombWorld);
	LastStack ^= 1;
	if (pStr[LastStack])
		Response (pStr[LastStack], BombWorld);

	if (PHRASE_ENABLED (whats_up_bomb) && (GET_GAME_STATE (BOMB_STACK1) > 1))
		Response (whats_up_bomb, BombWorld);

	if (GET_GAME_STATE (ULTRON_CONDITION)
			&& !GET_GAME_STATE (REFUSED_ULTRON_AT_BOMB))
		Response (got_ultron, ExitConversation);

	if (GET_GAME_STATE (BOMB_INFO))
	{
		Response (bye_bomb, ExitConversation);
	}
	else
	{
		Response (bye_neutral, ExitConversation);
	}
}