大地 发表于 7 天前

单位C转化为单位A(包括建筑物。);这个语句有发现新的BUG


                        <Effect type ='TransformUnit' toprotoid ='Minuteman' fromprotoid ='TradingPostCounter'></Effect>

将这个单位转换成民兵后,没有了视野,研究教堂的单位视野+2科技后,恢复正常。



        <Unit id ='1544' name ='TradingPostCounter'>
                <DBID>2223</DBID>
                <DisplayNameID>81014</DisplayNameID>
                <EditorNameID>81015</EditorNameID>
                <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>effects\projectiles\musket_ball.xml</AnimFile>
                <Icon>ui\techs\hc_greenwich_time\hc_greenwich_time</Icon>
                <ImpactType>Flesh</ImpactType>
                <PhysicsInfo>dude</PhysicsInfo>
                <InitialHitpoints>90.0000</InitialHitpoints>
                <MaxHitpoints>90.0000</MaxHitpoints>
                <LOS>0.0000</LOS>
                <ProjectileProtoUnit>Arrow</ProjectileProtoUnit>
                <UnitAIType>RangedCombative</UnitAIType>
                <TrainPoints>1.0000</TrainPoints>
                <UnitType>EmbellishmentClass</UnitType>
                <UnitType>TestClass</UnitType>
                <UnitType>Unattackable</UnitType>
                <Flag>CollidesWithProjectiles</Flag>
                <Flag>ApplyHandicapTraining</Flag>
                <Flag>CorpseDecays</Flag>
                <Flag>DontRotateObstruction</Flag>
                <Flag>ObscuredByUnits</Flag>
                <Flag>Tracked</Flag>
                <Flag>Wanders</Flag>
                <Flag>NotSelectable</Flag>
                <Flag>DoNotShowOnMiniMap</Flag>
                <Flag>NeverCountDeathAsLoss</Flag>
        </Unit>

こはね 发表于 7 天前

{:7_271:}

myonion 发表于 7 天前

本帖最后由 myonion 于 2026-10-22 21:20 编辑

transformUnit是这样的,会传递很多原单位上的信息,基本只能稳定用在大类相同战术接近的转换上,所以决定版发明了replaceUnit,直接在原位置给你发个新的
话说你这是在还原哪张卡,猜不出来
页: [1]
查看完整版本: 单位C转化为单位A(包括建筑物。);这个语句有发现新的BUG