support Transforms as attacks

This commit is contained in:
Chris Danford
2003-08-18 02:37:43 +00:00
parent 82314802d5
commit b4befeb3df
6 changed files with 129 additions and 42 deletions
+12
View File
@@ -521,6 +521,18 @@ void GameState::LaunchAttack( PlayerNumber target, Attack a )
{
LOG->Trace( "Launch attack '%s' against P%d", a.sModifier.c_str(), target+1 );
//
// Peek at the effect being applied. If it's a transform, add it to
// a list of transforms that should be applied by the Player on its
// next update.
//
PlayerOptions po;
po.FromString( a.sModifier );
if( po.m_Transform != PlayerOptions::TRANSFORM_NONE )
{
m_TransformsToApply[target].push_back( po.m_Transform );
}
// search for an open slot
for( int s=0; s<NUM_INVENTORY_SLOTS; s++ )
if( m_ActiveAttacks[target][s].fSecsRemaining <= 0 )