AIDef:Action/GuardianChargeBeam: Difference between revisions
Jump to navigation
Jump to search
imported>Leoetlino No edit summary |
imported>Leoetlino |
||
(2 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
== Init function == | == Init function == | ||
<source lang="c++"> | <source lang="c++"> | ||
void | void AI_Action_GuardianChargeBeam::init(AI_Action_GuardianChargeBeam *this) | ||
{ | { | ||
this->elapsedTime = 0.0; | this->elapsedTime = 0.0; | ||
this->chargeTime = * | this->chargeTime = *this->pTime; | ||
if ( aoc2::sInstance | if ( aoc2::sInstance | ||
&& aoc2::sInstance->hardModeEnabledFlag & 1 | && aoc2::sInstance->hardModeEnabledFlag & 1 | ||
Line 18: | Line 17: | ||
&& !(5LL * sead::Random::getU32(sead::GlobalRandom::sInstance) & 0x700000000LL) ) // probability is 20% | && !(5LL * sead::Random::getU32(sead::GlobalRandom::sInstance) & 0x700000000LL) ) // probability is 20% | ||
{ | { | ||
this->chargeTime = *this->pTimeRand | this->chargeTime += *this->pTimeRand; | ||
} | } | ||
} | } | ||
Line 27: | Line 26: | ||
! Name !! Type !! Default value !! Description | ! Name !! Type !! Default value !! Description | ||
|- | |- | ||
| Time || Float || || | | Time || Float || || Wait for X frames | ||
|- | |- | ||
| TimeRand || Float || || | | TimeRand || Float || || Wait for an ''additional'' X frames 20% of the time in Master Mode | ||
|- | |- | ||
| ChargeRadius || Float || || | | ChargeRadius || Float || || | ||
Line 36: | Line 35: | ||
|- | |- | ||
|} | |} | ||
== DynamicInstParams == | == DynamicInstParams == |
Latest revision as of 10:11, 22 October 2018
AI definition | |
---|---|
Type | Action |
Waits until the configured amount of frames have elapsed.
Init function
void AI_Action_GuardianChargeBeam::init(AI_Action_GuardianChargeBeam *this)
{
this->elapsedTime = 0.0;
this->chargeTime = *this->pTime;
if ( aoc2::sInstance
&& aoc2::sInstance->hardModeEnabledFlag & 1
&& aoc2::sInstance->aocFlags & 0x40
&& !(5LL * sead::Random::getU32(sead::GlobalRandom::sInstance) & 0x700000000LL) ) // probability is 20%
{
this->chargeTime += *this->pTimeRand;
}
}
StaticInstParams
Name | Type | Default value | Description |
---|---|---|---|
Time | Float | Wait for X frames | |
TimeRand | Float | Wait for an additional X frames 20% of the time in Master Mode | |
ChargeRadius | Float | ||
Color | Vec3 |
DynamicInstParams
Name | Type | Default value | Description |
---|---|---|---|
TargetPos | Vec3 |
Derived definitions
チャージ (Guardian_A, ビーム攻撃)
Name | Value |
---|---|
Time | 10.0 |
TimeRand | 0.0 |
ChargeRadius | 0.75 |
Color | Vec3(x=30.0, y=30.0, z=30.0) |
チャージ (RemainsWind_Battery_A_01, 行動)
Name | Value |
---|---|
Time | 10.0 |
TimeRand | 0.0 |
ChargeRadius | 0.75 |
Color | Vec3(x=30.0, y=30.0, z=30.0) |
チャージ (GuardianBeamCannon, 行動)
Name | Value |
---|---|
Time | 10.0 |
TimeRand | 25.0 |
ChargeRadius | 0.75 |
Color | Vec3(x=30.0, y=30.0, z=30.0) |