你以为我的目的就是为了修复这个BUG吗?那就错了
这个方法有点小问题,计算不精准 无限运送单位的科技,类似上面的无限研究科技,但是加入了检测单位数量,执行条件为Tool1的数量等于1,(需要配合上面所说的无限研发科技) techtreey.xml <Tech name="LoopSentUnit" type="Normal"> <DBID>5290</DBID> <ResearchPoints>0.0000</ResearchPoints> <Status>OBTAINABLE</Status> <Icon>ui\units\ironclad_icon</Icon> <Flag>Volatile</Flag> <Flag>YPInfiniteTech</Flag> <Prereqs> <typecount unit="Tool1" count="1.00" state="noneState aliveState buildingState" operator="eq"/> </Prereqs> <Effects> <Effect type ='TechStatus' status ='unobtainable'>LoopSentUnit</Effect> <Effect type ='TechStatus' status ='obtainable'>LoopSentUnit</Effect> <Effect type="Data" amount="10.00" subtype="FreeHomeCityMerc" unittype="Musketeer" relativity="Absolute"> <Target type="Player"/></Effect> </Effects> </Tech>
有个BUG,第一次训练单位会改良2次,<Lifespan>0.019</Lifespan>是测试出来的值,那个无限研发科技1秒大概研究500次,也就是每0.02秒刷新一次,但是所以必须在0.02秒内杀掉单位,否者会变成无限研发,瞬间运送多次单位,那样就没意义了。不是说1秒研发500次吗?为什么这里是0.02秒,我也不知道,总之我0.002秒删掉单位太快,科技无法执行,测试用0.01秒删单位也不行,也许一次检测要用上0.02秒左右 protoy.xml <Unit id ='909' name ='Tool1'> <DBID>1333</DBID> <ObstructionRadiusX>0.00</ObstructionRadiusX> <ObstructionRadiusZ>0.00</ObstructionRadiusZ> <FormationCategory>Ranged</FormationCategory> <MaxVelocity>4.5000</MaxVelocity> <MaxRunVelocity>6.0000</MaxRunVelocity> <MovementType>air</MovementType> <Lifespan>0.019</Lifespan> <TurnRate>18.0000</TurnRate> <AnimFile>units\asians\chinese\chu_ko_nu\chu_ko_nu.xml</AnimFile> <ImpactType>Flesh</ImpactType> <PhysicsInfo>dude</PhysicsInfo> <Icon>units\asians\chinese\chu_ko_nu\chu_ko_nu_icon_64</Icon> <PortraitIcon>units\asians\chinese\chu_ko_nu\chu_ko_nu_icon_portrait</PortraitIcon> <RolloverTextID>60151</RolloverTextID> <ShortRolloverTextID>60150</ShortRolloverTextID> <InitialHitpoints>90.0000</InitialHitpoints> <MaxHitpoints>90.0000</MaxHitpoints> <LOS>0.0000</LOS> <ProjectileProtoUnit>Arrow</ProjectileProtoUnit> <AutoAttackRange>16.0000</AutoAttackRange> <UnitAIType>RangedCombative</UnitAIType> <TrainPoints>10.0000</TrainPoints> <Bounty>9.0000</Bounty> <BuildBounty>9.0000</BuildBounty> <AllowedAge>1</AllowedAge> <Armor type ='Ranged' value ='0.2000'></Armor> <UnitType>Unit</UnitType> <Flag>CollidesWithProjectiles</Flag> <Flag>ApplyHandicapTraining</Flag> <Flag>CorpseDecays</Flag> <Flag>ShowGarrisonButton</Flag> <Flag>DontRotateObstruction</Flag> <Flag>ObscuredByUnits</Flag> <Flag>Tracked</Flag> <Command page ='10' column ='1'>Stop</Command> <Command page ='10' column ='0'>Garrison</Command> <Command page ='10' column ='2'>Delete</Command> <Tactics>tool1.tactics</Tactics> </Unit>
too2的作用就是用tactics生成tool1 <Unit id ='909' name ='Tool2'> <DBID>1333</DBID> <ObstructionRadiusX>0.00</ObstructionRadiusX> <ObstructionRadiusZ>0.00</ObstructionRadiusZ> <FormationCategory>Ranged</FormationCategory> <MaxVelocity>4.5000</MaxVelocity> <MaxRunVelocity>6.0000</MaxRunVelocity> <MovementType>air</MovementType> <TurnRate>18.0000</TurnRate> <AnimFile>units\asians\chinese\chu_ko_nu\chu_ko_nu.xml</AnimFile> <ImpactType>Flesh</ImpactType> <PhysicsInfo>dude</PhysicsInfo> <Icon>units\asians\chinese\chu_ko_nu\chu_ko_nu_icon_64</Icon> <PortraitIcon>units\asians\chinese\chu_ko_nu\chu_ko_nu_icon_portrait</PortraitIcon> <RolloverTextID>60151</RolloverTextID> <ShortRolloverTextID>60150</ShortRolloverTextID> <InitialHitpoints>90.0000</InitialHitpoints> <MaxHitpoints>90.0000</MaxHitpoints> <LOS>0.0000</LOS> <ProjectileProtoUnit>Arrow</ProjectileProtoUnit> <AutoAttackRange>16.0000</AutoAttackRange> <UnitAIType>RangedCombative</UnitAIType> <TrainPoints>10.0000</TrainPoints> <Bounty>9.0000</Bounty> <BuildBounty>9.0000</BuildBounty> <AllowedAge>1</AllowedAge> <Armor type ='Ranged' value ='0.2000'></Armor> <UnitType>Unit</UnitType> <Flag>CollidesWithProjectiles</Flag> <Flag>ApplyHandicapTraining</Flag> <Flag>CorpseDecays</Flag> <Flag>ShowGarrisonButton</Flag> <Flag>DontRotateObstruction</Flag> <Flag>ObscuredByUnits</Flag> <Flag>Tracked</Flag> <Command page ='10' column ='1'>Stop</Command> <Command page ='10' column ='0'>Garrison</Command> <Command page ='10' column ='2'>Delete</Command> <Tactics>tool2.tactics</Tactics> </Unit>
tool2.tactics <?xml version="1.0" encoding="utf-8"?>
<tactics> <action> <name>SpawnTool</name> <type>Maintain</type> <rate type="Tool1">1.0</rate> <active>1</active> <persistent>1</persistent> </action> <tactic> Idle <action>SpawnTool</action> <attacktype>LogicalTypeRangedUnitsAttack</attacktype> <autoattacktype>LogicalTypeRangedUnitsAutoAttack</autoattacktype> <attackresponsetype>LogicalTypeRangedUnitsAttack</attackresponsetype> <runaway>1</runaway> <autoretarget>1</autoretarget> <idleanim>Volley_standing_idle</idleanim> <boredanim>Volley_standing_bored</boredanim> <deathanim>Death_by_melee</deathanim> <walkanim>Volley_walk</walkanim> <joganim>Volley_jog</joganim> <runanim>Volley_run</runanim> </tactic> </tactics>
|