function Trig_blizzard_intelligence________2_Func002002003001 takes nothing returns boolean return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false ) endfunction function Trig_blizzard_intelligence________2_Func002002003002001 takes nothing returns boolean return ( IsUnitAliveBJ(GetFilterUnit()) == true ) endfunction function Trig_blizzard_intelligence________2_Func002002003002002 takes nothing returns boolean return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_blizzard_hero)) == true ) endfunction function Trig_blizzard_intelligence________2_Func002002003002 takes nothing returns boolean return GetBooleanAnd( Trig_blizzard_intelligence________2_Func002002003002001(), Trig_blizzard_intelligence________2_Func002002003002002() ) endfunction function Trig_blizzard_intelligence________2_Func002002003 takes nothing returns boolean return GetBooleanAnd( Trig_blizzard_intelligence________2_Func002002003001(), Trig_blizzard_intelligence________2_Func002002003002() ) endfunction function Trig_blizzard_intelligence________2_Func003A takes nothing returns nothing call AddSpecialEffectTargetUnitBJ( "overhead", GetEnumUnit(), "Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl" ) call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(udg_blizzard_hero), udg_blizzard_p, bj_UNIT_FACING ) call UnitDamageTargetBJ( bj_lastCreatedUnit, GetEnumUnit(), ( I2R(GetHeroInt(udg_blizzard_hero, true)) * 0.65 ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_COLD ) endfunction function Trig_blizzard_intelligence________2_Actions takes nothing returns nothing call YDWELocalVariableInitiliation( ) call YDWESetLocalVariableGroup( "g", GetUnitsInRangeOfLocMatching(BlzGetAbilityRealLevelField(BlzGetUnitAbility(udg_blizzard_hero, 'AHMB'), ABILITY_RLF_AREA_OF_EFFECT, GetUnitAbilityLevelSwapped('AHMB', udg_blizzard_hero)), udg_blizzard_p, Condition(function Trig_blizzard_intelligence________2_Func002002003)) ) call ForGroup( YDWEGetLocalVariableGroup("g"), function Trig_blizzard_intelligence________2_Func003A ) call GroupClear( YDWEGetLocalVariableGroup("g") ) call DestroyGroup( YDWEGetLocalVariableGroup("g") ) call YDWELocalVariableEnd( ) endfunction //=========================================================================== function InitTrig_blizzard_intelligence________2 takes nothing returns nothing set gg_trg_blizzard_intelligence________2 = CreateTrigger( ) call TriggerRegisterTimerExpireEventBJ( gg_trg_blizzard_intelligence________2, udg_blizzard_inte ) call TriggerAddAction( gg_trg_blizzard_intelligence________2, function Trig_blizzard_intelligence________2_Actions ) endfunction这段代码
时间: 2023-02-11 20:17:43 浏览: 91
这段代码是用来实现一个"暴风雪智能"的触发器,具体实现了以下功能:
1. 当触发器计时器到期时,会获取在指定地点范围内的所有敌方单位,并对其施加"overhead"特效,并在其位置创建一个新单位。
2. 会对获取的敌方单位造成伤害,伤害值是英雄的智力值的0.65倍。
3. 使用了几个函数来过滤单位,确保只对符合条件的单位进行操作。
相关问题
GPIO_InitStruct.Pin=TRIG_GPIO_PIN;
GPIO_InitStruct.Pin=TRIG_GPIO_PIN; 是一个设置GPIO引脚的结构体成员赋值操作。其中,TRIG_GPIO_PIN 是一个宏定义或者变量,用于指定具体的引脚编号。
在使用单片机或者嵌入式系统中,GPIO(General Purpose Input/Output)引脚用于与外部设备进行通信。通过配置引脚的不同功能和状态,可以实现输入和输出的功能。
在这个语句中,GPIO_InitStruct 是一个结构体变量,用于配置GPIO引脚的参数。Pin 是结构体中的一个成员,用于指定要配置的引脚编号。TRIG_GPIO_PIN 可以是一个宏定义或者变量,用于表示具体的引脚编号。
相关问题:
1. GPIO_InitStruct 是什么类型的结构体?
2. TRIG_GPIO_PIN 是如何定义的?
3. GPIO 引脚有哪些常见的配置参数?
adc_extternal_trig_source
adc_external_trig_source是STM32中ADC的外部触发源。在ADC进行转换时,我们可以通过设置外部触发源来控制ADC的转换行为。具体来说,当外部触发源触发时,ADC会根据我们设定的转换模式进行转换。
在STM32中,ADC有多个外部触发源可供选择。例如,可以选择TIM2的TRGO输出或者EXTI线路的事件来触发ADC的转换。我们可以通过设置adc_external_trig_source参数来选择不同的外部触发源。
需要注意的是,使用外部触发源时,还需要配置TIM或者EXTI相关的参数,以确保它们能够正常地触发ADC的转换。另外,在使用DMA传输数据时,也需要配置相关的DMA参数来保证数据传输正确。
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)