- Changed: Macil doesn't need the StrifeHumanoid's special death states so he might
as well inherit directly from AActor. - Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved the burning hand states to StrifePlayer where they really belong. SVN r1125 (trunk)
This commit is contained in:
parent
269a54a258
commit
0e009ff18a
16 changed files with 312 additions and 422 deletions
|
|
@ -4,24 +4,7 @@
|
|||
|
||||
// Coin ---------------------------------------------------------------------
|
||||
|
||||
FState ACoin::States[] =
|
||||
{
|
||||
S_NORMAL (COIN, 'A', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (ACoin, Strife, 93, 0)
|
||||
PROP_StrifeType (168)
|
||||
PROP_StrifeTeaserType (161)
|
||||
PROP_StrifeTeaserType2 (165)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Flags (MF_SPECIAL|MF_DROPPED|MF_NOTDMATCH)
|
||||
PROP_Flags2 (MF2_FLOORCLIP)
|
||||
PROP_Inventory_MaxAmountLong (INT_MAX)
|
||||
PROP_Inventory_FlagsSet (IF_INVBAR)
|
||||
PROP_Inventory_Icon ("I_COIN")
|
||||
PROP_Tag ("coin")
|
||||
PROP_Inventory_PickupMessage("$TXT_COIN")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (ACoin)
|
||||
|
||||
const char *ACoin::PickupMessage ()
|
||||
{
|
||||
|
|
@ -76,96 +59,6 @@ AInventory *ACoin::CreateCopy (AActor *other)
|
|||
return copy;
|
||||
}
|
||||
|
||||
// 10 Gold ------------------------------------------------------------------
|
||||
|
||||
class AGold10 : public ACoin
|
||||
{
|
||||
DECLARE_ACTOR (AGold10, ACoin)
|
||||
};
|
||||
|
||||
FState AGold10::States[] =
|
||||
{
|
||||
S_NORMAL (CRED, 'A', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AGold10, Strife, 138, 0)
|
||||
PROP_StrifeType (169)
|
||||
PROP_StrifeTeaserType (162)
|
||||
PROP_StrifeTeaserType2 (166)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Inventory_Amount (10)
|
||||
PROP_Tag ("10_gold")
|
||||
END_DEFAULTS
|
||||
|
||||
// 25 Gold ------------------------------------------------------------------
|
||||
|
||||
class AGold25 : public ACoin
|
||||
{
|
||||
DECLARE_ACTOR (AGold25, ACoin)
|
||||
};
|
||||
|
||||
FState AGold25::States[] =
|
||||
{
|
||||
S_NORMAL (SACK, 'A', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AGold25, Strife, 139, 0)
|
||||
PROP_StrifeType (170)
|
||||
PROP_StrifeTeaserType (163)
|
||||
PROP_StrifeTeaserType2 (167)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Inventory_Amount (25)
|
||||
PROP_Tag ("25_gold")
|
||||
END_DEFAULTS
|
||||
|
||||
// 50 Gold ------------------------------------------------------------------
|
||||
|
||||
class AGold50 : public ACoin
|
||||
{
|
||||
DECLARE_ACTOR (AGold50, ACoin)
|
||||
};
|
||||
|
||||
FState AGold50::States[] =
|
||||
{
|
||||
S_NORMAL (CHST, 'A', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AGold50, Strife, 140, 0)
|
||||
PROP_StrifeType (171)
|
||||
PROP_StrifeTeaserType (164)
|
||||
PROP_StrifeTeaserType2 (168)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Inventory_Amount (50)
|
||||
PROP_Tag ("50_gold")
|
||||
END_DEFAULTS
|
||||
|
||||
// 300 Gold ------------------------------------------------------------------
|
||||
|
||||
class AGold300 : public ACoin
|
||||
{
|
||||
DECLARE_ACTOR (AGold300, ACoin)
|
||||
public:
|
||||
bool TryPickup (AActor *toucher);
|
||||
};
|
||||
|
||||
FState AGold300::States[] =
|
||||
{
|
||||
S_NORMAL (TOKN, 'A', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AGold300, Strife, -1, 0)
|
||||
PROP_StrifeType (172)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Inventory_AmountWord (300)
|
||||
PROP_Tag ("300_gold")
|
||||
END_DEFAULTS
|
||||
|
||||
bool AGold300::TryPickup (AActor *toucher)
|
||||
{
|
||||
toucher->GiveInventoryType (QuestItemClasses[2]);
|
||||
return Super::TryPickup (toucher);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// ACoin :: CreateTossable
|
||||
|
|
@ -185,22 +78,22 @@ AInventory *ACoin::CreateTossable ()
|
|||
if (Amount >= 50)
|
||||
{
|
||||
Amount -= 50;
|
||||
tossed = Spawn<AGold50> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
tossed = static_cast<ACoin*>(Spawn("Gold50", Owner->x, Owner->y, Owner->z, NO_REPLACE));
|
||||
}
|
||||
else if (Amount >= 25)
|
||||
{
|
||||
Amount -= 25;
|
||||
tossed = Spawn<AGold25> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
tossed = static_cast<ACoin*>(Spawn("Gold25", Owner->x, Owner->y, Owner->z, NO_REPLACE));
|
||||
}
|
||||
else if (Amount >= 10)
|
||||
{
|
||||
Amount -= 10;
|
||||
tossed = Spawn<AGold10> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
tossed = static_cast<ACoin*>(Spawn("Gold10", Owner->x, Owner->y, Owner->z, NO_REPLACE));
|
||||
}
|
||||
else if (Amount > 1 || (ItemFlags & IF_KEEPDEPLETED))
|
||||
{
|
||||
Amount -= 1;
|
||||
tossed = Spawn<ACoin> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
tossed = static_cast<ACoin*>(Spawn("Coin", Owner->x, Owner->y, Owner->z, NO_REPLACE));
|
||||
}
|
||||
else // Amount == 1 && !(ItemFlags & IF_KEEPDEPLETED)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue