@@ -671,6 +671,26 @@ function convertTactic(tactic, stats, inactiveActions) {
671671 }
672672 }
673673 if ( tactic . name . text === "Heal" ) {
674+ if ( tactic . affectsTargetsInCombat === "" ) {
675+ const healType = "Rate" + tactic . name . text
676+ if ( tactic . active === "0" ) {
677+ inactiveActions . push ( healType + "InCombat" )
678+ inactiveActions . push ( "MaximumRange" + tactic . name . text )
679+ }
680+ if ( ! stats [ healType ] ) {
681+ stats [ healType ] = parseFloat ( tactic . rate [ 0 ] . text )
682+ stats [ healType + "InCombat" ] = parseFloat ( tactic . rate [ 0 ] . text )
683+ stats [ "MaximumRange" + tactic . name . text ] = parseFloat ( tactic . maxRange )
684+ }
685+ stats [ healType + "InCombat" ] = stats [ healType ]
686+ delete stats [ healType ]
687+ }
688+ if ( tactic . aoeHealRadius ) {
689+ stats [ tactic . name . text + "Area" ] = parseFloat ( tactic . aoeHealRadius )
690+ }
691+ if ( tactic . damageBonus ) {
692+ stats [ "HealdamageBonus" + tactic . damageBonus . type ] = parseFloat ( tactic . damageBonus . text )
693+ }
674694 if ( tactic . active !== "1" ) {
675695 break
676696 }
@@ -697,63 +717,106 @@ function convertTactic(tactic, stats, inactiveActions) {
697717 }
698718 }
699719 }
700- if ( tactic . affectsTargetsInCombat === "" ) {
701- const healType = "Rate" + tactic . name . text
702- if ( tactic . active === "0" ) {
703- inactiveActions . push ( healType + "InCombat" )
704- inactiveActions . push ( "MaximumRange" + tactic . name . text )
705- }
706- if ( ! stats [ healType ] ) {
707- stats [ healType ] = parseFloat ( tactic . rate [ 0 ] . text )
708- stats [ healType + "InCombat" ] = parseFloat ( tactic . rate [ 0 ] . text )
709- stats [ "MaximumRange" + tactic . name . text ] = parseFloat ( tactic . maxRange )
710- }
711- stats [ healType + "InCombat" ] = stats [ healType ]
712- delete stats [ healType ]
713- }
714- if ( tactic . aoeHealRadius ) {
715- stats [ tactic . name . text + "Area" ] = parseFloat ( tactic . aoeHealRadius )
716- }
717- if ( tactic . damageBonus ) {
718- stats [ "HealdamageBonus" + tactic . damageBonus . type ] = parseFloat ( tactic . damageBonus . text )
719- }
720720 break
721721 case "Convert" : {
722- if ( tactic . anim === "Chaos" ) {
723- stats . ChaosStandardConvertable = stats . ConvertStandardConvertable
724- /*delete stats.ConvertStandardConvertable*/
725- if ( stats . ConvertConvertableCavalry !== undefined ) {
726- stats . ChaosConvertableCavalry = stats . ConvertConvertableCavalry
727- delete stats . ConvertConvertableCavalry
728- }
729- if ( stats . ConvertConvertableSiege !== undefined ) {
730- stats . ChaosConvertableSiege = stats . ConvertConvertableSiege
731- delete stats . ConvertConvertableSiege
732- }
733- if ( stats . ConvertConvertableInfantry !== undefined ) {
734- stats . ChaosConvertableInfantry = stats . ConvertConvertableInfantry
735- delete stats . ConvertConvertableInfantry
736- }
737- if ( stats . MaximumRangeConvert !== undefined ) {
738- stats . MaximumRangeChaos = stats . MaximumRangeConvert
739- delete stats . MaximumRangeConvert
722+ if ( tactic . aoe === "" ) {
723+ stats . ConvertAOE = 1
724+ if ( tactic . active === "0" ) {
725+ inactiveActions . push ( "ConvertAOE" )
740726 }
741727 }
728+ if ( tactic . name . text === "Convert" ) {
729+ if ( tactic . anim === "Chaos" ) {
730+ stats . ChaosStandardConvertable = stats . ConvertStandardConvertable
731+ /*delete stats.ConvertStandardConvertable*/
732+ if ( stats . ConvertConvertableCavalry !== undefined ) {
733+ stats . ChaosConvertableCavalry = stats . ConvertConvertableCavalry
734+ delete stats . ConvertConvertableCavalry
735+ }
736+ if ( stats . ConvertConvertableSiege !== undefined ) {
737+ stats . ChaosConvertableSiege = stats . ConvertConvertableSiege
738+ delete stats . ConvertConvertableSiege
739+ }
740+ if ( stats . ConvertConvertableInfantry !== undefined ) {
741+ stats . ChaosConvertableInfantry = stats . ConvertConvertableInfantry
742+ delete stats . ConvertConvertableInfantry
743+ }
744+ if ( stats . MaximumRangeConvert !== undefined ) {
745+ stats . MaximumRangeChaos = stats . MaximumRangeConvert
746+ delete stats . MaximumRangeConvert
747+ }
748+ }
742749
743- else {
744- if ( Array . isArray ( tactic . rate ) ) {
745- for ( let i = 0 ; i < tactic . rate . length ; i ++ ) {
746- const rate = tactic . rate [ i ]
750+ else {
751+ if ( Array . isArray ( tactic . rate ) ) {
752+ for ( let i = 0 ; i < tactic . rate . length ; i ++ ) {
753+ const rate = tactic . rate [ i ]
747754
748- if ( tactic . active !== "0" ) {
749755 if ( ! stats [ tactic . type + rate . type ] ) {
750756 stats [ tactic . type + rate . type ] = parseFloat ( rate . text )
757+ if ( tactic . active === "0" ) {
758+ inactiveActions . push ( tactic . type + rate . type )
759+ }
751760 }
752761 }
753762 }
754763 }
764+
765+ break
766+ }
767+ if ( tactic . name . text === "Convert2" ) {
768+ if ( tactic . anim === "Chaos" ) {
769+ stats . Chaos2StandardConvertable = stats . Convert2StandardConvertable
770+ if ( tactic . active === "0" ) {
771+ inactiveActions . push ( "Chaos2StandardConvertable" )
772+ }
773+ /*delete stats.Convert2StandardConvertable*/
774+ if ( stats . Convert2ConvertableCavalry !== undefined ) {
775+ stats . Chaos2ConvertableCavalry = stats . Convert2ConvertableCavalry
776+ delete stats . Convert2ConvertableCavalry
777+ if ( tactic . active === "0" ) {
778+ inactiveActions . push ( "Chaos2ConvertableCavalry" )
779+ }
780+ }
781+ if ( stats . Convert2ConvertableSiege !== undefined ) {
782+ stats . Chaos2ConvertableSiege = stats . Convert2ConvertableSiege
783+ delete stats . Convert2ConvertableSiege
784+ if ( tactic . active === "0" ) {
785+ inactiveActions . push ( "Chaos2ConvertableSiege" )
786+ }
787+ }
788+ if ( stats . ConvertConvertableInfantry !== undefined ) {
789+ stats . Chaos2ConvertableInfantry = stats . Convert2ConvertableInfantry
790+ delete stats . Convert2ConvertableInfantry
791+ if ( tactic . active === "0" ) {
792+ inactiveActions . push ( "Chaos2ConvertableInfantry" )
793+ }
794+ }
795+ if ( stats . MaximumRangeConvert !== undefined ) {
796+ stats . MaximumRangeChaos2 = stats . MaximumRangeConvert2
797+ delete stats . MaximumRangeConvert2
798+ if ( tactic . active === "0" ) {
799+ inactiveActions . push ( "MaximumRangeChaos2" )
800+ }
801+ }
802+ }
803+
804+ else {
805+ if ( Array . isArray ( tactic . rate ) ) {
806+ for ( let i = 0 ; i < tactic . rate . length ; i ++ ) {
807+ const rate = tactic . rate [ i ]
808+
809+ if ( ! stats [ "Convert2" + rate . type ] ) {
810+ stats [ "Convert2" + rate . type ] = parseFloat ( rate . text )
811+ if ( tactic . active === "0" ) {
812+ inactiveActions . push ( "Convert2" + rate . type )
813+ }
814+ }
815+ }
816+ }
817+ }
818+ break
755819 }
756- break
757820 }
758821 }
759822}
0 commit comments