Beispiel #1
0
/************************************************************************
*																		*
*  Constructor.															*
*																		*
************************************************************************/
CAttackRound::CAttackRound(CBattleEntity* attacker, CBattleEntity* defender)
{
    m_attacker = attacker;
    m_defender = defender;
    m_kickAttackOccured = false;
    m_sataOccured = false;
    m_subWeaponType = 0;

    if (attacker->m_Weapons[SLOT_SUB]->isType(ITEM_WEAPON))
    {
        m_subWeaponType = attacker->m_Weapons[SLOT_SUB]->getDmgType();
    }

    // Grab a trick attack assistant.
    m_taEntity = battleutils::getAvailableTrickAttackChar(attacker, attacker->GetBattleTarget());

    // Build main weapon attacks.
    CreateAttacks(attacker->m_Weapons[SLOT_MAIN], RIGHTATTACK);

    // Build dual wield off hand weapon attacks.
    if (IsH2H())
    {
        // Build left hand H2H attacks.
        CreateAttacks(attacker->m_Weapons[SLOT_MAIN], LEFTATTACK);

        // Build kick attacks.
        CreateKickAttacks();
    }

    else if ((m_subWeaponType > 0 && m_subWeaponType < 4) ||
        (attacker->objtype == TYPE_MOB && static_cast<CMobEntity*>(attacker)->getMobMod(MOBMOD_DUAL_WIELD)))
    {
        CreateAttacks(attacker->m_Weapons[SLOT_SUB], LEFTATTACK);
    }

    // Build Daken throw
    CreateDakenAttack();

    // Set the first attack flag
    m_attackSwings[0].SetAsFirstSwing();

    // Delete the haste samba effect.
    attacker->StatusEffectContainer->DelStatusEffect(EFFECT_HASTE_SAMBA_HASTE);

    // Clear the action list.
    attacker->m_ActionList.clear();
}
Beispiel #2
0
/************************************************************************
*																		*
*  Constructor.															*
*																		*
************************************************************************/
CAttackRound::CAttackRound(CBattleEntity* attacker)
{
	m_attacker = attacker;
	m_doubleAttackOccured = false;
	m_tripleAttackOccured = false;
	m_quadAttackOccured = false;
	m_kickAttackOccured = false;
	m_zanshinOccured = false;
	m_sataOccured = false;
	m_missOccured = false;
	m_subWeaponType = attacker->m_Weapons[SLOT_SUB]->getDmgType();

	// Grab a trick attack assistant.
	m_taEntity = battleutils::getAvailableTrickAttackChar(attacker, attacker->PBattleAI->GetBattleTarget());

	// Build main weapon attacks.
	CreateAttacks(attacker->m_Weapons[SLOT_MAIN], RIGHTATTACK);

	// Build dual wield off hand weapon attacks.
	if ((m_subWeaponType > 0 && m_subWeaponType < 4))
	{
		CreateAttacks(attacker->m_Weapons[SLOT_SUB], LEFTATTACK);
	}

	if (IsH2H())
	{
		// Build left hand H2H attacks.
		CreateAttacks(attacker->m_Weapons[SLOT_MAIN], LEFTATTACK);

		// Build kick attacks.
		CreateKickAttacks();
	}

	// Set the first attack flag
	m_attackSwings.at(0)->SetAsFirstSwing();

	// Delete the haste samba effect.
    attacker->StatusEffectContainer->DelStatusEffect(EFFECT_HASTE_SAMBA_HASTE);

	// Clear the action list.
	attacker->m_ActionList.clear();
}