diff --git a/Assets/ManagedResources/Fonts/ArtFont_4/ArtFont_4_mat.mat b/Assets/ManagedResources/Fonts/ArtFont_4/ArtFont_4_mat.mat index 379decdff7..46aadfeaf2 100644 --- a/Assets/ManagedResources/Fonts/ArtFont_4/ArtFont_4_mat.mat +++ b/Assets/ManagedResources/Fonts/ArtFont_4/ArtFont_4_mat.mat @@ -20,7 +20,7 @@ Material: serializedVersion: 3 m_TexEnvs: - _MainTex: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 1fce59d7564616f4391c013750e3fc05, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Floats: [] diff --git a/Assets/ManagedResources/Fonts/BattleFont/BattleFont.fnt b/Assets/ManagedResources/Fonts/BattleFont/BattleFont.fnt index a3efe72a7a..68af6656e2 100644 --- a/Assets/ManagedResources/Fonts/BattleFont/BattleFont.fnt +++ b/Assets/ManagedResources/Fonts/BattleFont/BattleFont.fnt @@ -1,9 +1,9 @@ info face="Arial" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 outline=0 -common lineHeight=32 base=26 scaleW=1024 scaleH=1024 pages=1 packed=0 alphaChnl=1 redChnl=0 greenChnl=0 blueChnl=0 +common lineHeight=32 base=26 scaleW=1024 scaleH=1024 pages=1 packed=1 alphaChnl=1 redChnl=0 greenChnl=0 blueChnl=0 page id=0 file="BattleFont_0.png" chars count=87 char id=33 x=0 y=0 width=194 height=142 xoffset=0 yoffset=0 xadvance=194 page=0 chnl=15 -char id=34 x=646 y=307 width=106 height=57 xoffset=0 yoffset=0 xadvance=106 page=0 chnl=15 +char id=34 x=268 y=416 width=106 height=57 xoffset=0 yoffset=0 xadvance=106 page=0 chnl=15 char id=35 x=0 y=143 width=149 height=98 xoffset=0 yoffset=0 xadvance=149 page=0 chnl=15 char id=40 x=280 y=0 width=84 height=124 xoffset=0 yoffset=0 xadvance=84 page=0 chnl=15 char id=41 x=938 y=0 width=40 height=124 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 @@ -16,76 +16,76 @@ char id=47 x=865 y=0 width=72 height=124 xoffset=0 yoffset=0 char id=48 x=620 y=0 width=84 height=124 xoffset=0 yoffset=0 xadvance=84 page=0 chnl=15 char id=49 x=195 y=0 width=84 height=124 xoffset=0 yoffset=0 xadvance=84 page=0 chnl=15 char id=50 x=209 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=51 x=530 y=307 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 -char id=52 x=0 y=242 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=53 x=798 y=216 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 -char id=54 x=114 y=242 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=51 x=123 y=424 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 +char id=52 x=173 y=234 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=53 x=228 y=325 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 +char id=54 x=230 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 char id=55 x=504 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 char id=56 x=563 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=57 x=972 y=125 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 -char id=58 x=228 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=59 x=858 y=125 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=57 x=503 y=307 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 +char id=58 x=287 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=59 x=59 y=242 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 char id=60 x=799 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=61 x=559 y=307 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 -char id=62 x=399 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=63 x=853 y=216 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 -char id=64 x=513 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=65 x=445 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=66 x=622 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=67 x=0 y=333 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 -char id=68 x=627 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=69 x=285 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=70 x=268 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=71 x=588 y=307 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 -char id=72 x=915 y=125 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=73 x=908 y=216 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 -char id=74 x=171 y=234 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=61 x=152 y=424 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 +char id=62 x=458 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=63 x=338 y=307 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 +char id=64 x=515 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=65 x=268 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=66 x=327 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=67 x=605 y=307 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 +char id=68 x=629 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=69 x=344 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=70 x=681 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=71 x=239 y=416 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 +char id=72 x=800 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=73 x=393 y=307 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 +char id=74 x=857 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 char id=75 x=150 y=143 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=76 x=327 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=77 x=51 y=333 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 -char id=78 x=456 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=79 x=570 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=80 x=386 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=81 x=617 y=307 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 -char id=82 x=741 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=83 x=963 y=216 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 -char id=84 x=684 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=85 x=681 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=86 x=740 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=87 x=102 y=333 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 -char id=88 x=57 y=242 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=89 x=342 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=90 x=80 y=424 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 -char id=91 x=424 y=398 width=21 height=55 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=92 x=907 y=307 width=37 height=56 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 -char id=93 x=316 y=398 width=37 height=55 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 -char id=94 x=945 y=307 width=37 height=56 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 -char id=95 x=120 y=424 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 -char id=96 x=0 y=424 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 -char id=97 x=389 y=398 width=34 height=55 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 -char id=98 x=753 y=307 width=38 height=56 xoffset=0 yoffset=0 xadvance=38 page=0 chnl=15 -char id=99 x=200 y=416 width=38 height=55 xoffset=0 yoffset=0 xadvance=38 page=0 chnl=15 -char id=100 x=40 y=424 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 -char id=101 x=446 y=398 width=21 height=55 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=102 x=831 y=307 width=37 height=56 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 -char id=103 x=278 y=398 width=37 height=55 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 -char id=104 x=869 y=307 width=37 height=56 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 -char id=105 x=160 y=424 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 -char id=106 x=983 y=307 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 -char id=107 x=354 y=398 width=34 height=55 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 -char id=108 x=792 y=307 width=38 height=56 xoffset=0 yoffset=0 xadvance=38 page=0 chnl=15 -char id=109 x=239 y=398 width=38 height=55 xoffset=0 yoffset=0 xadvance=38 page=0 chnl=15 -char id=110 x=153 y=333 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 -char id=111 x=366 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 -char id=112 x=196 y=325 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 -char id=113 x=325 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 -char id=114 x=239 y=307 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 -char id=115 x=407 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 +char id=76 x=386 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=77 x=656 y=307 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 +char id=78 x=914 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=79 x=0 y=333 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=80 x=858 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=81 x=181 y=424 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 +char id=82 x=57 y=333 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=83 x=283 y=307 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 +char id=84 x=401 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=85 x=917 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=86 x=0 y=242 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=87 x=971 y=216 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 +char id=88 x=171 y=333 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=89 x=116 y=242 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=90 x=445 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=91 x=210 y=424 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 +char id=92 x=572 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=93 x=448 y=307 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 +char id=94 x=114 y=333 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=95 x=622 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=96 x=740 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=97 x=554 y=307 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 +char id=98 x=743 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=99 x=686 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=100 x=490 y=398 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 +char id=101 x=1002 y=307 width=21 height=55 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 +char id=102 x=414 y=398 width=37 height=56 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 +char id=103 x=649 y=398 width=37 height=55 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 +char id=104 x=452 y=398 width=37 height=56 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 +char id=105 x=530 y=398 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 +char id=106 x=570 y=398 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 +char id=107 x=687 y=398 width=34 height=55 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=108 x=375 y=398 width=38 height=56 xoffset=0 yoffset=0 xadvance=38 page=0 chnl=15 +char id=109 x=610 y=398 width=38 height=55 xoffset=0 yoffset=0 xadvance=38 page=0 chnl=15 +char id=110 x=976 y=125 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 +char id=111 x=920 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 +char id=112 x=707 y=307 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 +char id=113 x=879 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 +char id=114 x=750 y=307 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 +char id=115 x=961 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 char id=116 x=979 y=0 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 -char id=117 x=448 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 -char id=118 x=282 y=307 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 -char id=119 x=489 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 -char id=120 x=979 y=91 width=30 height=13 xoffset=0 yoffset=0 xadvance=30 page=0 chnl=15 -char id=121 x=468 y=398 width=29 height=44 xoffset=0 yoffset=0 xadvance=29 page=0 chnl=15 -char id=122 x=979 y=105 width=30 height=13 xoffset=0 yoffset=0 xadvance=30 page=0 chnl=15 -char id=124 x=498 y=398 width=29 height=44 xoffset=0 yoffset=0 xadvance=29 page=0 chnl=15 +char id=117 x=0 y=424 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 +char id=118 x=793 y=307 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 +char id=119 x=41 y=424 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 +char id=120 x=836 y=307 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 +char id=121 x=82 y=424 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 +char id=122 x=979 y=91 width=30 height=13 xoffset=0 yoffset=0 xadvance=30 page=0 chnl=15 +char id=124 x=722 y=398 width=29 height=44 xoffset=0 yoffset=0 xadvance=29 page=0 chnl=15 diff --git a/Assets/ManagedResources/Fonts/BattleFont/BattleFont_0.png b/Assets/ManagedResources/Fonts/BattleFont/BattleFont_0.png index 8dc532f74a..0036cf3704 100644 Binary files a/Assets/ManagedResources/Fonts/BattleFont/BattleFont_0.png and b/Assets/ManagedResources/Fonts/BattleFont/BattleFont_0.png differ diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Buff.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Buff.lua index 79dc51424d..8273577a6a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Buff.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Buff.lua @@ -218,7 +218,11 @@ function BuffManager:GetAllBuffByFunc(checkFunc) end -function BuffManager:HasBuff(target, type, checkFunc) +function BuffManager:HasBuff(target, type, checkFunc,caster,dotType) + --如果当前是判断燃烧buff and 当前目标是攻击的主目标则直接返回true + if type== BuffName.DOT and caster and dotType and dotType==1 and caster.curMainTarget==target then + return true + end if self.buffDic.kvList[type] then local buffList = self.buffDic.kvList[type] for i=1, buffList.size do @@ -251,6 +255,7 @@ function BuffManager:ClearBuff(target, func) end buff:OnEnd() buff.target.Event:DispatchEvent(BattleEventName.BuffEnd, buff) + BattleLogic.Event:DispatchEvent(BattleEventName.BuffEnd, buff) putBuff(buff) list:Remove(idx) else @@ -319,6 +324,7 @@ function BuffManager:Update() buffList:Add(buff) buff:OnStart() buff.target.Event:DispatchEvent(BattleEventName.BuffStart, buff) + BattleLogic.Event:DispatchEvent(BattleEventName.BuffStart, buff) end -- 清除过期buff @@ -331,6 +337,7 @@ function BuffManager:Update() if buff.disperse then buff:OnEnd() buff.target.Event:DispatchEvent(BattleEventName.BuffEnd, buff) + BattleLogic.Event:DispatchEvent(BattleEventName.BuffEnd, buff) putBuff(buff) buffList:Remove(index) else diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua index b58f7ff010..3e200bc1f9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua @@ -391,7 +391,7 @@ local effectList = { local f3 = args[6] BattleLogic.WaitForTrigger(interval, function () BattleUtil.CalDamage(skill, caster, target, dt, f1) - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end,caster,dot) then BattleUtil.RandomControl(f1, ct, caster, target, f3) end end) @@ -404,7 +404,7 @@ local effectList = { local dot = args[3] local f2 = args[4] BattleLogic.WaitForTrigger(interval, function () - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end,caster,dot) then f1 = f1*(1+f2) end BattleUtil.CalDamage(skill, caster, target, dt, f1) @@ -445,7 +445,7 @@ local effectList = { local trigger = function(defRole, damageFunc, damage) if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot - end) then + end,caster,dot) then damage = damage + floor(damage * f1) end damageFunc(damage) @@ -486,7 +486,7 @@ local effectList = { local f2 = args[4] caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target) BattleLogic.WaitForTrigger(interval, function () - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end,caster,dot) then f1 = f1*(1+f2) end BattleUtil.CalDamage(skill, caster, target, dt, f1) @@ -2027,7 +2027,7 @@ local effectList = { caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target) BattleLogic.WaitForTrigger(interval, function () local OnPassiveDamaging = function(damagingFunc, defRole, damage) - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end,caster,dot) then if damagingFunc then damagingFunc(-floor(damage * f2)) end @@ -2072,7 +2072,7 @@ local effectList = { caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target) BattleLogic.WaitForTrigger(interval, function () local isSecKill = false - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end,caster,dot) then -- 检测被动技能对秒杀参数得影响 f2, f3 = BattleUtil.CheckSeckill(f2, f3, caster, target) -- @@ -2204,7 +2204,7 @@ local effectList = { -- caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target) BattleLogic.WaitForTrigger(interval, function () BattleUtil.CalDamage(skill, caster, target, dt, f1) - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end,caster,dot) then BattleUtil.RandomControl(f2, ct, caster, target, f3) end end) @@ -2220,7 +2220,7 @@ local effectList = { caster.Event:DispatchEvent(BattleEventName.RoleViewBullet, skill, target) BattleLogic.WaitForTrigger(interval, function () local index, tran - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end,caster,dot) then index, tran = caster:AddPropertyTransfer(RoleDataName.Crit, f2, RoleDataName.Crit, 1) end BattleUtil.CalDamage(skill, caster, target, dt, f1) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua index 4226fe072c..72342eaadb 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua @@ -1019,21 +1019,23 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.RoleHit, OnDamage,nil,nil,role) end, - --造成暴击时,额外造成目标最大生命值[a]%的伤害。(目标最大生命值伤害总上限为施法者2.5倍攻击) + --技能造成暴击时,额外造成目标最大生命值[a]%的伤害。 --a[float] [56] = function(role, args,id,judge) local f1 = args[1] local lastTrigger = 0 local OnRoleCrit = function(defRole, damage, bCrit, finalDmg, damageType, skill) - lastTrigger = lastTrigger + 1 - if lastTrigger > 1 then --加入限定避免循环触发 - return + -- lastTrigger = lastTrigger + 1 + -- if lastTrigger > 1 then --加入限定避免循环触发 + -- return + -- end + if skill and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill ) then + local ar1 = floor(BattleUtil.FP_Mul(defRole:GetRoleData(RoleDataName.MaxHp), f1)) + --local ar2 = BattleUtil.FP_Mul(role:GetRoleData(RoleDataName.Attack), 2.5) + BattleUtil.FinalDamage(nil, role, defRole, ar1) + --lastTrigger = 0 end - local ar1 = BattleUtil.FP_Mul(defRole:GetRoleData(RoleDataName.MaxHp), f1) - local ar2 = BattleUtil.FP_Mul(role:GetRoleData(RoleDataName.Attack), 2.5) - BattleUtil.ApplyDamage(nil, role, defRole, floor(min(ar1, ar2))) - lastTrigger = 0 end role.Event:AddEvent(BattleEventName.RoleCrit, OnRoleCrit,nil,nil,role) end, @@ -1875,7 +1877,7 @@ local passivityList = { - -- 释放技能后增加友方全体[a]点怒气 + -- 释放技能后增加友方全体[a]点怒气,是否 -- a[int] [105] = function(role, args,id,judge) local i1 = args[1] @@ -1917,24 +1919,34 @@ local passivityList = { role.Event:AddEvent(BattleEventName.RoleBeHit, onBeHit,nil,nil,role) end, - -- 释放技能后自身回[a]点怒气,回怒概率[b]%(不填为100%) - -- a[int],b[float] + -- 释放技能后自身回[a]点怒气,回怒概率[b]%(不填为100%),阵营限制为[c](不填/填0为不限制阵营),[d]为技能类型(不填默认只有绝技) + -- a[int],b[float],c[int 阵营id],d[int 1:绝技.额外技能 ] [107] = function(role, args,id,judge) local i1 = args[1] local p1 = args[2] + local ele= args[3] + local type=args[4] if not p1 then p1=1 end + -- 释放技能后 local onSkillEnd = function(skill) if skill and not skill.isTriggerJudge and judge==1 then return end - if skill.type == BattleSkillType.Special then + if ele and ele~=0 and role.element~=ele then + return + end + if not type and skill.type~= BattleSkillType.Special then + return + end + if type==1 and skill.type~=BattleSkillType.Special and skill.type~=BattleSkillType.Extra then + return + end BattleUtil.RandomAction(p1, function () BattleUtil.CalRage(role, role, i1, CountTypeName.Add) end) - end end role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) end, @@ -2250,16 +2262,20 @@ local passivityList = { role.Event:AddEvent(BattleEventName.RoleBeHit, onBeHit,nil,nil,role) end, - -- 普攻后回复[a]点怒气 - -- a[int] + -- 普攻后回复[a]点怒气,普攻类型为[b](b不填默认为所有普攻) + -- a[int],b[int 1:追加的普攻 ] [121] = function(role, args,id,judge) local i1 = args[1] + local type =args[2] -- 释放技能后 local onSkillEnd = function(skill) if skill and not skill.isTriggerJudge and judge==1 then return end if skill.type == BattleSkillType.Normal then + if type and type==1 and not skill.isAdd then + return + end BattleUtil.CalRage(role, role, i1, CountTypeName.Add) end end @@ -2349,14 +2365,16 @@ local passivityList = { role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, - -- 战斗中生命每减少[c]%,[d]就[e]改变[f]% - -- c[float]d[属性]e[改变类型]f[float] + -- 战斗中生命每减少[a]%,[b]就[c]改变[d]%,[e]属性[f]改变[g]% (e f g 不填就不会加) + -- a[float],b[属性],c[改变类型],d[float],e[int],f[int],g[float] [126] = function(role, args) local f1 = args[1] local pro = args[2] local dt = args[3] local f2 = args[4] - + local pro2 = args[5] + local dt2 = args[6] + local f3 = args[7] local curLevel = 0 -- 释放技能后 local onRoleBeDamaged = function(caster, damage) @@ -2369,6 +2387,10 @@ local passivityList = { local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[pro], f2, dt) buff.cover = true role:AddBuff(buff) + if pro2 and dt2 and f3 then + local buff = Buff.Create(role, BuffName.PropertyChange, 0, BattlePropList[pro2], f3, dt2) + role:AddBuff(buff) + end end curLevel = level end @@ -2476,7 +2498,7 @@ local passivityList = { end end end - BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead, OnDead,nil,nil,role) + BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, OnDead,nil,nil,role) -- local passivityDamaging = function(func, caster, damage, skill) -- if skill and not skill.isTriggerJudge and judge==1 then @@ -2556,7 +2578,7 @@ local passivityList = { local index, tran local OnRoleDamageBefore = function(target,factorFunc,damageType,skill) - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end,role,dot) then index, tran = role:AddPropertyTransfer(BattlePropList[pro], f1, BattlePropList[pro], ct) end end @@ -2737,7 +2759,7 @@ local passivityList = { local f1 = args[3] local onPassiveBeDamaging = function(func, caster, damage) - if BattleLogic.BuffMgr:HasBuff(caster, BuffName.DOT, function(buff) return buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(caster, BuffName.DOT, function(buff) return buff.damageType == dot end,role,dot) then local dmgDeduction = damage - floor(BattleUtil.ErrorCorrection(BattleUtil.CountValue(damage, f1, ct))) if func then func(dmgDeduction) end end @@ -2780,7 +2802,7 @@ local passivityList = { if not skill then return end - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end,role,dot) then --吸血修改 finaldamage 改为 damage by:往王振兴 2020/08/17 BattleUtil.ApplyTreat(role, role, floor(BattleUtil.ErrorCorrection(damage * f1))) end @@ -2817,7 +2839,7 @@ local passivityList = { local onSkillControl = function(func, ctrl2, target) if ctrl2 == ctrl then - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(b) return b.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(b) return b.damageType == dot end,role,dot) then if func then func(f1, ct) end end end @@ -2872,7 +2894,7 @@ local passivityList = { return end if skill and skill.type == BattleSkillType.Special and - BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then + BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end,role,dot) then index, tran = role:AddPropertyTransfer(BattlePropList[pro], f1, BattlePropList[pro], ct) end end @@ -2896,7 +2918,7 @@ local passivityList = { local ct = args[3] local onPassiveDamaging = function(damagingFunc, defRole, damage) - if BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT, function(buff) return buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT, function(buff) return buff.damageType == dot end,role,dot) then if damagingFunc then local dd = BattleUtil.CountValue(damage, f1, ct) - damage damagingFunc(-floor(BattleUtil.ErrorCorrection(dd))) @@ -2960,7 +2982,7 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.RoleHit, onHit) end local onDamaging = function(func, target,damage,skill) - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end,role,dot) then role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role) end end @@ -2996,7 +3018,7 @@ local passivityList = { end if attor[target.position] and skill and skill.type == BattleSkillType.Special and func then local df = f1 - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end,role,dot) then df = f2 end local dd = BattleUtil.CountValue(damage, df, ct) - damage @@ -3015,7 +3037,7 @@ local passivityList = { local ct = args[3] local onPassiveDamaging = function(damagingFunc, defRole, damage) - if BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT, function(buff) return buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT, function(buff) return buff.damageType == dot end,role,dot) then if damagingFunc then local dd = BattleUtil.CountValue(damage, f1, ct) - damage damagingFunc(-floor(BattleUtil.ErrorCorrection(dd))) @@ -3052,7 +3074,7 @@ local passivityList = { -- local onRoleHit = function(defRole, damage, bCrit, finalDmg, damageType, skill) if skill and skill.type == BattleSkillType.Normal and not defRole:IsDead() then - if BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT, function (buff) return dot == 0 or buff.damageType == dot end,role,dot) then local isBoss=BattleUtil.CheckIsBoss(defRole) if isBoss then return @@ -3072,23 +3094,30 @@ local passivityList = { role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) end, - -- 释放技能有[a]%概率附加[b]效果持续[c]回合 - -- a[float]b[控制状态]c[int] + -- 释放技能有[a]%概率附加[b]效果持续[c]回合,查找目标条件[d](填技能查找目标逻辑,不填按照技能目标查找) + -- a[float]b[控制状态]c[int],d[int] [152] = function(role, args,id,judge) local f1 = args[1] local ctrl = args[2] local i1 = args[3] - + local con = args[4] -- 技能后后 local onSkillCastEnd = function(skill) if skill and not skill.isTriggerJudge and judge==1 then return end - if skill.type == BattleSkillType.Special then - local targets = skill:GetDirectTargetsNoMiss() - if targets then - for _, r in ipairs(targets) do - BattleUtil.RandomControl(f1, ctrl, role, r, i1) + if skill.type == BattleSkillType.Special or skill.type == BattleSkillType.Extra then + if con then + local arr=BattleUtil.ChooseTarget(role,con) + for i = 1, #arr do + BattleUtil.RandomControl(f1, ctrl, role, arr[i], i1) + end + else + local targets = skill:GetDirectTargetsNoMiss() + if targets then + for _, r in ipairs(targets) do + BattleUtil.RandomControl(f1, ctrl, role, r, i1) + end end end end @@ -3361,7 +3390,6 @@ local passivityList = { end end BattleLogic.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) - end, -- 爆伤减免增加[a]%,[b]改变 @@ -3410,7 +3438,7 @@ local passivityList = { local dot = args[1] local f1 = args[2] local onHit = function(target, damage, bCrit, finalDmg) - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end,role,dot) then --吸血修改 finaldamage 改为 damage by:往王振兴 2020/08/17 BattleUtil.ApplyTreat(role, role, floor(BattleUtil.ErrorCorrection(damage * f1))) end @@ -3528,7 +3556,7 @@ local passivityList = { end, -- 攻击目标越少[a]对每个目标提升概率越高,提升概率为[b]%除以被击者的总数,提升为[c]改变 - -- a[控制状态]b[float]c[改变类型] + -- a[控制状态],b[float],c[改变类型] [172] = function(role, args,id,judge) local ctrl = args[1] local f1 = args[2] @@ -3968,12 +3996,15 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role) end, - -- 武将怒气小于[a]点时不会释放技能,释放技能消耗当前所有怒气超过4怒气部分每额外消耗1点怒气技能伤害增加[b]% + -- 武将怒气小于[a]点时不会释放技能,释放技能消耗当前所有 怒气超过[c]怒气部分每额外消耗1点怒气技能伤害增加[b]%(c不填默认为4) -- a[int]b[float] [192] = function(role, args) local i1 = args[1] local f1 = args[2] - + local num = args[3] + if not num then + num=4 + end -- 提高技能释放怒气值 role.SuperSkillRage = i1 @@ -3992,7 +4023,7 @@ local passivityList = { -- 释放技能后 local onPassiveDamaging = function(damagingFunc, defRole, damage, skill, dotType) if skill and skill.type == BattleSkillType.Special then - local deltaRage = allRage - 4 + local deltaRage = allRage - num if deltaRage > 0 then local dd = BattleUtil.CountValue(damage, f1 * deltaRage, 2) - damage damagingFunc(-floor(BattleUtil.ErrorCorrection(dd))) @@ -4193,8 +4224,8 @@ local passivityList = { -- 同阵营武将受到直接伤害时该伤害[a]%转移给有此锦囊的武将转移伤害属于直接伤害(无法触发任何特性) -- a[float] [200] = function(role, args) - if PassiveManager.passiveCountList[role.camp][200] and PassiveManager.passiveCountList[role.camp][200] > 0 then - return + if PassiveManager.passiveCountList[role.camp][200] and PassiveManager.passiveCountList[role.camp][200] > 0 then + return end PassiveManager.passiveCountList[role.camp][200] = 1 local f1 = args[1] @@ -4238,8 +4269,7 @@ local passivityList = { [201] = function(role, args) local i1 = args[1] local f1 = args[2] - role:AddRage(i1, CountTypeName.Add) - + BattleUtil.CalRage(role,role,i1,CountTypeName.Add) local function onPassiveSeckill(func) local isBoss=BattleUtil.CheckIsBoss(defRole) if isBoss then @@ -4268,7 +4298,7 @@ local passivityList = { -- 直接伤害概率无法复活 local function onRoleHit(target,damage,bCrit,finalDmg,damageType,skill) if target:IsDead() then - if not BattleLogic.BuffMgr:HasBuff(role, BuffName.DOT, function (buff) return buff.damageType == dot or dot == 0 end) then + if not BattleLogic.BuffMgr:HasBuff(role, BuffName.DOT, function (buff) return buff.damageType == dot or dot == 0 end,role,dot) then BattleUtil.RandomAction(f2, function() target:SetReliveFilter(false) end) @@ -4294,8 +4324,7 @@ local passivityList = { local f1 = args[2] local i2 = args[3] -- 初始怒气增加 - role:AddRage(i1, CountTypeName.Add) - + BattleUtil.CalRage(role,role,i1,CountTypeName.Add) -- 死亡数量 local onRoleTurnEnd = function(target) if not target:IsDead() and BattleLogic.BuffMgr:HasBuff(target, BuffName.Curse, function(buff) return buff.curseType == CurseTypeName.ShareDamage end) then @@ -5400,7 +5429,7 @@ local passivityList = { role.Event:RemoveEvent(BattleEventName.RoleHit, onHit) end local onDamaging = function(func, target) - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end,role,dot) then role.Event:AddEvent(BattleEventName.RoleHit, onHit,nil,nil,role) end end @@ -5634,7 +5663,7 @@ local passivityList = { role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) end, --本次技能中如果有[a]目标,额外回复[b]点怒气 - -- a[持续伤害状态]b[int] + -- a[持续伤害状态],b[int] [261]=function(role,args,id,judge) local dot=args[1] local i1 = args[2]--defRole, damage, bCrit, finalDmg, damageType, skill @@ -5652,7 +5681,7 @@ local passivityList = { end local num=0 for key, value in pairs(list) do - local isHave=BattleLogic.BuffMgr:HasBuff(value, BuffName.DOT, function(buff) return buff.damageType == dot and buff.caster==role and buff.startRound == BattleLogic.GetCurRound() end) + local isHave=BattleLogic.BuffMgr:HasBuff(value, BuffName.DOT, function(buff) return buff.damageType == dot and buff.caster==role and buff.startRound == BattleLogic.GetCurRound() end,role,dot) if isHave then num=num+1 end @@ -5707,7 +5736,8 @@ local passivityList = { if defRole and defRole.camp~=role.camp and skill.owner==role and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Extra) then BattleUtil.RandomAction(pro, function() BattleLogic.BuffMgr:ClearBuff(defRole, function(buff) - if buff.type == BuffName.Immune and (buff.immuneType == 4 or buff.immuneType == 2) then + --之前写的 buff.immuneType == 2 不知道为什么清除免疫燃烧 改成==1 了 by:王振兴 2021/06/09 + if buff.type == BuffName.Immune and (buff.immuneType == 4 or buff.immuneType == 1) then buff.target.Event:DispatchEvent(BattleEventName.ShowHintText, BattleArtFontType.clear) return true end @@ -5753,7 +5783,7 @@ local passivityList = { -- table.insert(list,defRole) for i=1, #list do --如果目标身上没有灼烧效果 - if not BattleLogic.BuffMgr:HasBuff(list[i], BuffName.DOT, function (buff) return buff.type== BuffName.DOT and buff.damageType==state1 end) then + if not BattleLogic.BuffMgr:HasBuff(list[i], BuffName.DOT, function (buff) return buff.type== BuffName.DOT and buff.damageType==state1 end,role,state1) then local damage = BattleUtil.ErrorCorrection(v1 * role:GetRoleData(BattlePropList[pro1])) BattleUtil.RandomDot(1, state2, role, list[i], time, 1, floor(damage)) end @@ -5867,7 +5897,7 @@ local passivityList = { local curBuff=nil local onRoleDamageBefore=function(atkRole, factorFunc, damageType, skill) - if atkRole.camp~= role.camp and BattleLogic.BuffMgr:HasBuff(skill.owner, BuffName.DOT, function (buff) return buff.damageType == sta1 end) then + if atkRole.camp~= role.camp and BattleLogic.BuffMgr:HasBuff(skill.owner, BuffName.DOT, function (buff) return buff.damageType == sta1 end,role,sta1) then --curBuff=Buff.Create(role, BuffName.Immune, 1,4,immune) -- role:AddBuff(curBuff) role.buffFilter:Add(immune) @@ -5921,7 +5951,7 @@ local passivityList = { if caster and caster.camp==role.camp then return end - if BattleLogic.BuffMgr:HasBuff(caster, BuffName.DOT, function(buff) return buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(caster, BuffName.DOT, function(buff) return buff.damageType == dot end,role,dot) then BattleUtil.CalRage(role, role, f1, ct) end end @@ -5962,7 +5992,7 @@ local passivityList = { if target and target.camp==role.camp then return end - if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end) then + if BattleLogic.BuffMgr:HasBuff(target, BuffName.DOT, function(buff) return buff.damageType == dot end,role,dot) then local list = RoleManager.GetNeighbor(role, 1) if list then for key, value in pairs(list) do @@ -6010,7 +6040,7 @@ local passivityList = { local curBuff=nil local immuneState=false local onRoleDamageBefore=function(atkRole, factorFunc, damageType, skill) - if atkRole.camp~= role.camp and BattleLogic.BuffMgr:HasBuff(skill.owner, BuffName.DOT, function (buff) return buff.damageType == sta1 end) then + if atkRole.camp~= role.camp and BattleLogic.BuffMgr:HasBuff(skill.owner, BuffName.DOT, function (buff) return buff.damageType == sta1 end,role,sta1) then --curBuff=Buff.Create(role, BuffName.Immune, 1,4,immune) -- role:AddBuff(curBuff) role.buffFilter:Add(immune) @@ -6121,13 +6151,24 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.SkillEffectBefore, onSkillEffectBefore,nil,nil,role) end, - --为己方神将附加的护盾消失后,回复被保护的神将[a][b]%的血量 - --a[int 属性id] b[flaot] + --为己方神将附加的护盾消失后,回复被保护的神将[a][b]%的血量,盾的类型为[c],己方神将为[d]阵营 (不填c,默认为所有盾;不填d,默认所有阵营) + --a[int 属性id] b[flaot] c[int] d[int] [278]=function(role,args) local pro=args[1] local v1=args[2] + local shieldType = args[3] + local ele =args[4] local OnBuffEnd=function(buff) - if buff and not buff.target:IsDead() and buff.caster==role and buff.type==BuffName.Shield then + if buff.caster~=role then + return + end + if ele and buff.target.element~=ele then + return + end + if shieldType and buff and buff.type==BuffName.Shield and buff.shieldType~=shieldType then + return + end + if buff and not buff.target:IsDead() and buff.type==BuffName.Shield then local val = floor(BattleUtil.FP_Mul(v1, buff.target:GetRoleData(BattlePropList[pro]))) BattleUtil.CalTreat(role,buff.target, val) end @@ -6191,7 +6232,7 @@ local passivityList = { if num>=0 then --精卫转移怒气不算减怒 role.Rage=role.Rage-lessRage - caster:AddRage(lessRage, CountTypeName.Add) + BattleUtil.CalRage(role,caster,lessRage,CountTypeName.Add) -- 用于记录统计 BattleLogic.Event:DispatchEvent(BattleEventName.RecordTransRage, role, caster, lessRage) end @@ -6231,13 +6272,17 @@ local passivityList = { end BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, OnRoundChange,nil,nil,role) end, - --释放技能后,额外[a]改变[b]方怒气最少的[c]阵营目标[d]点怒气 - --a[int 改变类型],b[int 0:己方 1:敌方],c[int],d[int] + --释放技能后,额外[a]改变[b]方怒气最少的[c]阵营目标[d]点怒气,目标人数[e](e 不填默认为 1人 填10为敌方燃烧数 ) + --a[int 改变类型],b[int 0:己方 1:敌方],c[int],d[int],e[int] [283]=function(role,args,id,judge) local ct=args[1] local camp=args[2] local ele=args[3] local v1=args[4] + local num= args[5] + if not num then + num=1 + end local onSkillCastEnd=function(skill) if skill and not skill.isTriggerJudge and judge==1 then return @@ -6247,13 +6292,29 @@ local passivityList = { if camp==0 then list= RoleManager.Query(function(v) return v.camp == role.camp and v.element==ele end) elseif camp==1 then - list= RoleManager.Query(function(v) return v.camp ~= role.camp and v.element==ele end) + list= RoleManager.Query(function(v) return v.camp ~= role.camp and v.element==ele end) end if not list or #list ==0 then return end + --查找敌方燃烧数量 + if num==10 then + num=0 + local arr=skill:GetDirectTargets() + -- local arr=RoleManager.Query(function (v) return v.camp~=role.camp end) + for i = 1, #arr do + local aaa=BattleLogic.BuffMgr:HasBuff(arr[i], BuffName.DOT, function (buff) return buff.damageType==1 end,role,1) + if aaa then + num=num+1 + end + end + end list=BattleUtil.SortByRage(list,0) - BattleUtil.CalRage(role, list[1], v1, ct) + for i = 1, #list do + if i<=num then + BattleUtil.CalRage(role, list[i], v1, ct) + end + end end end role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) @@ -6542,7 +6603,7 @@ local passivityList = { local onRoundChange=function() if aa>=time then local ange= floor(aa/time) - role:AddRage(ange*num, CountTypeName.Add) + BattleUtil.CalRage(role,role,ange*num,CountTypeName.Add) aa=0 end end @@ -6568,7 +6629,7 @@ local passivityList = { end end if isHave then - role:AddRage(num, CountTypeName.Add) + BattleUtil.CalRage(role,role,num,CountTypeName.Add) end end end @@ -6579,41 +6640,45 @@ local passivityList = { -- 技能,普攻治疗治疗的目标为[a]阵营,资料量额外提升[b]%,并解除[c]效果 -- a[int], b[flaot], c[持续伤害type类型] [298] = function(role, args,id,judge) - local ele = args[1] - local v1 = args[2] - local type = args[3] - local curSkill = nil - local passiveTreating = function(func,target) - if curSkill and curSkill.isTriggerJudge==false and judge==1 then - return - end - if target and target.roleData.element ==ele then - BattleLogic.BuffMgr:ClearBuff(target, function (buff) - return buff.type == BuffName.DOT and buff.damageType==type - end) - if func then func(v1, CountTypeName.AddPencent) end - end - end - local disposeCtrlNoHeal = function(caster,target) - if caster==role and target.ctrl_noheal and target.roleData.element==ele then - BattleLogic.BuffMgr:ClearBuff(target, function (buff) - return buff.type == BuffName.Control and buff.ctrlType==4 - end) + local ele = args[1] + local v1 = args[2] + local type = args[3] + local curSkill = nil + local passiveTreating = function(func,target) + if curSkill and curSkill.isTriggerJudge==false and judge==1 then + return + end + if target and target.roleData.element ==ele then + if type then + BattleLogic.BuffMgr:ClearBuff(target, function (buff) + return buff.type == BuffName.DOT and buff.damageType==type + end) + end + if func then func(v1, CountTypeName.AddPencent) end + end + end + local disposeCtrlNoHeal = function(caster,target) + if caster==role and target.ctrl_noheal and target.roleData.element==ele then + if type then + BattleLogic.BuffMgr:ClearBuff(target, function (buff) + return buff.type == BuffName.Control and buff.ctrlType==4 + end) end - end - local OnSkillCast = function(skill) - curSkill=skill - role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, passiveTreating,nil,nil,role) - BattleLogic.Event:AddEvent(BattleEventName.DisposeRoleCtrl_noheal,disposeCtrlNoHeal,nil,nil,role) - end - local OnSkillCastEnd = function(skill) - curSkill=nil - role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, passiveTreating) - BattleLogic.Event:RemoveEvent(BattleEventName.DisposeRoleCtrl_noheal,disposeCtrlNoHeal) - end - role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast,nil,nil,role) - role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role) - end, + end + end + local OnSkillCast = function(skill) + curSkill=skill + role.Event:AddEvent(BattleEventName.PassiveTreatingFactor, passiveTreating) + BattleLogic.Event:AddEvent(BattleEventName.DisposeRoleCtrl_noheal,disposeCtrlNoHeal) + end + local OnSkillCastEnd = function(skill) + curSkill=nil + role.Event:RemoveEvent(BattleEventName.PassiveTreatingFactor, passiveTreating) + BattleLogic.Event:RemoveEvent(BattleEventName.DisposeRoleCtrl_noheal,disposeCtrlNoHeal) + end + role.Event:AddEvent(BattleEventName.SkillCast, OnSkillCast) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd) + end, --死亡时,立即回复己方全体自身[a]*[b]的血量。 --a[属性],b[float] @@ -6843,6 +6908,184 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffCaster,nil,nil,role) end, + -- 受到技能伤害时,会为血量属性最低的神将额外回复自身[a]%的[b] + -- 回复a[float] b[int 属性id] + [307] = function(role, args) + local f1 = args[1] + local pro=args[2] + local onBeSkillHit = function(caster, damage, bCrit, finalDmg, damageType, skill) + --如果角色死亡就不会触发 + if role:IsDead() then + return + end + -- if skill and not skill.isTriggerJudge and judge==1 then + -- return + -- end + -- LogYellow("307 1") + if skill and (skill.type==BattleSkillType.Special or skill.type== BattleSkillType.Extra or skill.type== BattleSkillType.Monster) then --技能造成的直接伤害 + local list = RoleManager.Query(function(v) return v.camp == role.camp end) + BattleUtil.SortByHpFactor(list, 1) + -- LogYellow("307 2") + if list[1] then + -- LogYellow("307 3") + local val = floor(BattleUtil.FP_Mul(f1, list[1]:GetRoleData(BattlePropList[pro]))) + BattleUtil.CalTreat(role, list[1], val) + end + end + end + role.Event:AddEvent(BattleEventName.RoleBeHit, onBeSkillHit,nil,nil,role) + end, + -- 普攻后目标附加1个免疫控制的效果[a][b][c](眩晕、沉默、麻痹)的护盾,持续[d]]回合 + -- 免疫控制的效果a[int]b[int]c[int] d[int,回合] + [308] = function(role, args,id,judge) + local ctrl = args[1] + local ctr2 = args[2] + local ctr3 = args[3] + local round = args[4] + local ctrls={} + if ctrl then + table.insert(ctrls,ctrl) + end + if ctr2 then + table.insert(ctrls,ctr2) + end + if ctr3 then + table.insert(ctrls,ctr3) + end + local immune = function(buff) + return buff.type == BuffName.Control and (BattleUtil.ChecklistIsContainValue(ctrls,buff.ctrlType)) + end + -- 释放技能后 + local onSkillEnd = function(skill) + -- if skill and not skill.isTriggerJudge and judge==1 then + -- return + -- end + -- LogYellow("308 1") + if skill.type == BattleSkillType.Normal then + local targets = skill:GetDirectTargetsNoMiss() + -- LogYellow("308 2") + if targets then + -- LogYellow("308 3: "..#targets) + local curBuff=nil + for _, r in ipairs(targets) do + curBuff=Buff.Create(r, BuffName.Immune, round,4,immune) + r:AddBuff(curBuff) + end + end + end + end + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillEnd,nil,nil,role) + end, + --释放技能时,如果当前血量最少的神将为[a]系神将,清除控制效果(眩晕、沉默、麻痹、混乱) + --a[int,角色职业] 控制效果b[int]c[int]d[int]e[int] + [309] = function(role, args) + local ele = args[1] + local ctrl = args[2] + local ctr2 = args[3] + local ctr3 = args[4] + local ctr4 = args[5] + local SkillCast = function(damagingFunc, defRole, damage, skill) + local list = RoleManager.Query(function(v) return v.camp == role.camp end) + BattleUtil.SortByHpFactor(list, 1) + local target = nil + -- LogYellow("309 1: "..#list) + for i = 1, #list do + if not list[i]:IsRealDead() then + target = list[i] + break + end + end + if target and target.roleData.element==ele then + -- LogYellow("309 2") + BattleLogic.BuffMgr:ClearBuff(target, function(buff) + -- LogYellow("309 3: "..buff.type.." "..buff.ctrlType) + return buff.type == BuffName.Control and (buff.ctrlType == ctrl or buff.immuneType == ctr2 or buff.immuneType == ctr3 or buff.immuneType == ctr4) + end) + end + end + role.Event:AddEvent(BattleEventName.SkillCast,SkillCast,nil,nil,role) + end, + -- 敌方暴毙时,将会对周围的目标造成[a]%的[b]属性伤害 + -- a[float] b[int,属性id] + [310] = function(role, args,id,judge) + local f1 = args[1] + local pro =args[2] + local onRoleHit = function(target, damage, bCrit, finalDmg) + -- --屏蔽相同阵应 + -- if target and target.camp==role.camp then + -- return + -- end + -- LogYellow("310 1 "..target.position) + if target:IsDead() then + local list = RoleManager.GetNeighbor(target, 1) + if list then + for key, value in pairs(list) do + if value and value ~= target then + -- LogYellow("310 2 周围的目标造成[a]%的[b]属性伤害 value:"..value.position) + local val = floor(BattleUtil.FP_Mul(f1, role:GetRoleData(BattlePropList[pro]))) + -- LogYellow("310 end pro: "..pro.." val: "..val) + BattleUtil.FinalDamage(role, value, val) + end + end + end + end + end + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) + end, + -- 触发追击技能时,该追击技能的伤害[a]% 提高[b]改变类型 + -- a[float] b[int,改变类型] + [311] = function(role, args) + local f1 = args[1] + local ct = args[2] + local OnPassiveDamaging = function(damagingFunc, defRole, damage, skill) + -- LogYellow("311 1 ") + -- if skill then + -- LogYellow("311 2 "..skill.type.." "..tostring(skill.isAdd)) + -- end + if skill and skill.type == BattleSkillType.Extra and skill.isAdd then + local dd = BattleUtil.CountValue(damage, f1, ct) - damage + -- LogYellow("311 3 end f1: "..f1.." ct: "..ct.." dd "..dd) + damagingFunc(-floor(BattleUtil.ErrorCorrection(dd))) + end + end + role.Event:AddEvent(BattleEventName.PassiveDamaging, OnPassiveDamaging,nil,nil,role) + end, + + -- 敌方处于链接符状态的目标如果受到回怒效果,阎罗王也同时受到回怒效果,每回合回复不超过[a]点怒气。 + -- a[int] + [312] = function(role, args) + local n1 = args[1] + local curRoundAddValue = 0--当前回合加的所有怒气点数 + local onRecordRageChange = function(caster, target, deltaRage,countType,value) + -- LogYellow("312 1") + if countType == CountTypeName.Add then + -- LogYellow("312 2") + local list=BattleLogic.BuffMgr:GetBuff(target) + for i = 1, #list do + local buff=list[i] + -- 有连接符 + if BattleLogic.BuffMgr:HasBuff(target, BuffName.Curse, function(buff) return buff.curseType == CurseTypeName.ShareDamage end) then + -- LogYellow("312 3") + if curRoundAddValue <= n1 then + local endAddNum = value + if (curRoundAddValue + endAddNum) > n1 then + endAddNum = n1 - curRoundAddValue + end + -- LogYellow("312 4 endAddNum: "..endAddNum) + curRoundAddValue = curRoundAddValue + endAddNum + BattleUtil.CalRage(role,role,endAddNum,CountTypeName.Add) + return + end + end + end + end + end + BattleLogic.Event:AddEvent(BattleEventName.RecordRageChange, onRecordRageChange,nil,nil,role) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, function(curRound) + -- LogYellow("312 5 curRoundAddValue = 0") + curRoundAddValue = 0 + end,nil,nil,role) + end, -- 根据生命百分比添加被动 血量百分比[a],被动id[b],...(后面没有的不配) -- a[float],b[int],c[float],d[int],e[float],f[int],g[float],h[int] [313] = function(role, args,id,judge) @@ -7066,6 +7309,425 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.FinalBeDamageEnd, onFinalBeDamage,nil,nil,role) end, + --技能击杀目标溢出伤害的[a]%将对生命百分比最[b]的 攻击目标造成伤害 + -- a[float],b[int 0:最高 1:最低] + [322]=function(role,args,id,judge) + local f1 = args[1] + local type = args[2] + local point=nil + local allDamage=0 + -- 直接伤害后 + local onRoleHit = function(target, damage, bCrit, finalDmg, damageType, skill) + if skill and not skill.isTriggerJudge and judge==1 then + return + end + if skill and skill.owner==role and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra) and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then + local dmg= floor(BattleUtil.ErrorCorrection((damage-finalDmg)*f1)) + if target:IsDead() then + allDamage=allDamage+dmg + end + end + end + role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) + + local onSkillCastEnd=function (skill) + if not skill then + return + end + if allDamage>0 then + local list = skill:GetDirectTargets() + list = BattleUtil.SortByHpFactor(list,type) + if list then + for i = 1, #list do + if list[i] and not list[i]:IsDead() then + BattleUtil.FinalDamage(nil,role,list[i],allDamage) + allDamage=0 + break + end + end + end + end + end + + + role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillCastEnd,nil,nil,role) + end, + --[a]攻击时,如果目标处于持续伤害[b]状态,则有[c]%的概率使目标[d][e]回合 + --a[int 攻击类型 1:普攻 4:死亡技能] + [323]=function(role,args,id,judge) + local st = args[1] + local dt = args[2] + local p1 = args[3] + local ct = args[4] + local round=args[5] + local onRoleBeDamage=function (defRole, atkRole, damage, bCrit, finalDmg, damageType, dotType, skill) + if atkRole and atkRole~=role then + return + end + if not skill or skill.type~=st then + return + end + if skill and not skill.isTriggerJudge and judge==1 then + return + end + if BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT, function(buff) return buff.damageType == dt end,role,dt) then + BattleUtil.RandomControl(p1,ct,role,defRole,round) + end + end + BattleLogic.Event:AddEvent(BattleEventName.RoleBeDamaged,onRoleBeDamage,nil,nil,role) + end, + --释放技能怒气不足时,损失自身([a]-我方活着的[b]系神将数)%生命*不足怒气数 后释放技能 + --a[int],b[int] + [324]=function(role,args) + local max=args[1] + local ele=args[2] + local onRoleCastSkillBrfore=function(caster) + if caster~=role then + return + end + --释放者死亡或释放着被沉默 + if caster:IsRealDead() or caster.ctrl_slient then + return + end + local num=role.SuperSkillRage-role.Rage + local list = RoleManager.Query(function(v) return v.camp == role.camp and v.element==ele and v~=role end) + local curHp=role:GetRoleData(RoleDataName.Hp) + local aaa=(max-#list)/100*num + local removeHp= floor(role:GetRoleData(RoleDataName.MaxHp)*aaa) + --如果血量不足抵扣就只剩1点血 + if removeHp>=curHp then + removeHp=curHp-1 + end + BattleUtil.CalRage(role,role,num,CountTypeName.Add) + BattleUtil.FinalDamage(nil,role,role,removeHp) + end + BattleLogic.Event:AddEvent(BattleEventName.RoleCastSkillBefore, onRoleCastSkillBrfore,nil,nil,role) + end, + -- 被自身控制[a]的敌方目标,己方[b]阵营神将对其造成伤害增加[c]% + -- a[int 控制状态] b[int] c[float] + [325] = function(role, args) + local f1 = args[1] + local ele = args[2] + local f2 = args[3] + + local function onPassiveDamaging(damagingFunc, atkRole, defRole, damage,skill,skilldotType, bCrit,damageType, dotType,isDirect) + --不是真实伤害 + if not skill and not isDirect then + return + end + if atkRole.camp==role.camp and atkRole.element==ele and BattleLogic.BuffMgr:HasBuff(defRole, BuffName.Control, function (buff) return buff.ctrlType == f1 and buff.caster==role end) then + local dd = BattleUtil.CountValue(damage, f2, CountTypeName.AddPencent) - damage + damagingFunc(-floor(BattleUtil.ErrorCorrection(dd))) + end + end + BattleLogic.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) + end, + --自身添加的控制[a]结束时,被控制的目标改变[b][c]点怒气 + --a[int], b[int], c[int] + [326]=function(role,args) + local ctrl=args[1] + local ct =args[2] + local num =args[3] + local OnBuffEnd=function(buff) + if buff.caster~=role or buff.type~= BuffName.Control or buff.ctrlType~=ctrl then + return + end + BattleUtil.CalRage(role,buff.target,num,ct) + end + BattleLogic.Event:AddEvent(BattleEventName.BuffEnd, OnBuffEnd,nil,nil,role) + end, + --释放技能后,我方怒气最少的[a]阵营目标行动一回合(释放一次技能) + --a[int] + [327]=function(role,args,id,judge) + local ele=args[1] + + local onSkillCastEnd=function(skill) + if skill and not skill.isTriggerJudge and judge==1 then + return + end + if skill and (skill.type== BattleSkillType.Special or skill.type==BattleSkillType.Extra ) then + local list= RoleManager.Query(function(v) return v.camp == role.camp and v.element==ele and v~=role end) + if not list or #list ==0 then + return + end + list=BattleUtil.SortByRage(list,0) + -- list[1]:CastSkill() + BattleLogic.InsertSkillRole(list[1]) + end + end + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) + end, + --[a]排敌人获取无法消除的无敌盾,无敌盾击杀全部另外一排后消失 + --a[int 1:前排 2:后排] + [328]=function(role,args,id,judge) + local pos=args[1] + local buff=nil + --给我方前/后排上无敌盾 + if pos==BattleUtil.GetRolePosType(role.position) then + --无敌盾 + buff=Buff.Create(role, BuffName.Shield, 0, ShieldTypeName.AllReduce, 0, 0) + buff.clear=false + role:AddBuff(buff) + end + + local onBattleRoleDead = function(defRole) + --如果死的是敌方 or 死亡的是有无敌盾的那排 + if defRole.camp~=role.camp or pos==BattleUtil.GetRolePosType(defRole.position) then + return + end + local list = RoleManager.Query(function(v) return v.camp == role.camp and pos~=BattleUtil.GetRolePosType(v.position) end) + BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime*3, function ()--加个延时,防止击杀的角色复活计算不准确 + if #list>0 then + return + end + if BattleLogic.BuffMgr:HasBuff(role, BuffName.Shield, function(buff1) return buff1==buff end) then + buff.disperse=true + end + end) + end + BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, onBattleRoleDead,nil,nil,role) + end, + --死亡后有[a]%概率[b]%血量复活,并回复[c]点怒气 + --a[float],b[float],c[int] + [329]=function (role,args,id,judge) + local p1=args[1] + local p2=args[2] + local num=args[3] + local onRoleRealDead = function(deadRole) + --如果死亡的不是自身 + if deadRole~=role then + return + end + BattleUtil.RandomAction(p1, function () + deadRole:SetRelive(p2) + BattleUtil.CalRage(role, role,num,CountTypeName.Add) + end) + end + BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, onRoleRealDead,nil,nil,role) + end, + --死亡后有[a]%概率随机击杀敌方一个神将 + --a[float] + [330]=function (role,args,id,judge) + local p1=args[1] + local onRoleRealDead = function(deadRole) + --如果死亡的不是自身 + if deadRole~=role then + return + end + BattleUtil.RandomAction(p1, function () + local list = RoleManager.Query(function(r) + return r.camp ~= role.camp + end) + if #list < 1 then return end + local index = Random.RangeInt(1, #list) + local target = list[index] + BattleUtil.Seckill(nil,role,target) + end) + end + BattleLogic.Event:AddEvent(BattleEventName.RoleRealDead, onRoleRealDead,nil,nil,role) + end, + --行动后,每剩余1点怒气对[a]自己造成伤害[b][c]%的伤害 + --a[int 1:自己],b[int],c[float] + [331]=function (role,args,id,judge) + local v1=args[1] + local v2=args[2] + local v3=args[3] + local onRoleRealDead = function(caster) + if caster~=role then + return + end + local target=nil + if v1==1 then + target=role + end + local damage=floor(BattleUtil.ErrorCorrection(target:GetRoleData(BattlePropList[v2]) * v3))*target.Rage + BattleUtil.FinalDamage(nil,role,target,damage) + end + BattleLogic.Event:AddEvent(BattleEventName.RoleTurnStart, onRoleRealDead,nil,nil,role) + end, + --技能击中受到[a,持续伤害]的目标,会有[b]%概率[c]改变[d]点怒气(概率随人数增加),阵营限制为[e]阵营(e不填则没有限制) + -- a[int 持续伤害],b[float],c[int],d[int],e[int] + [332]=function(role,args,id,judge) + local dot=args[1] + local p1 = args[2] + local ct=args[3] + local num=args[4] + local ele=args[5] + local burnList={} + local OnRoleHit = function(skill) + if skill and not skill.isTriggerJudge and judge==1 then + return + end + if not skill then + return + end + if ele and ele~=role.element then + return + end + local list=skill:GetDirectTargetsNoMiss() + if not list then + return + end + for key, value in pairs(list) do + local isHave=BattleLogic.BuffMgr:HasBuff(value, BuffName.DOT, function(buff) return buff.damageType == dot and buff.caster==role end,role,dot) + if isHave then + if not BattleUtil.ChecklistIsContainValue(burnList,value.position) then + table.insert(burnList,value.position) + end + end + end + BattleUtil.RandomAction(p1*#burnList,function() + BattleUtil.CalRage(role,role,num,ct) + end) + burnList={} + end + local onSkillCast=function(skill,defRole) + if skill and not skill.isTriggerJudge and judge==1 then + return + end + if not skill then + return + end + if not BattleUtil.ChecklistIsContainValue(burnList,defRole.position) then + table.insert(burnList,defRole.position) + end + end + role.Event:AddEvent(BattleEventName.HitRoleInBurn,onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, OnRoleHit,nil,nil,role) + end, + --技能攻击使目标怒气清零时,[a]%概率恢复[b]点怒气(概率随人数增加),阵营限制[c](c不填不做限制) + --a[float],c[float],d[伤害类型],e[int] + [333] = function(role, args,id,judge) + local p1 = args[1] + local v1 = args[2] + local ele = args[3] + --被爆击的人数 + local count=0 + + local OnRoleCrit = function(caster, target, deltaRage,countType,value,lastRage) + if ele and ele~=role.element then + return + end + if target.camp==role.camp then + return + end + if countType==CountTypeName.Sub and target.Rage==0 and lastRage~=0 then + count=count+1 + end + end + + -- 技能后后 + local onSkillCastEnd = function(skill) + if skill and not skill.isTriggerJudge and judge==1 then + return + end + if skill.owner~=role then + return + end + BattleUtil.RandomAction(p1*count,function() + BattleUtil.CalRage(role, role,v1, CountTypeName.Add) + end) + end + + local onSkillCast = function(skill) + count=0 + end + + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + BattleLogic.Event:AddEvent(BattleEventName.RecordRageChange, OnRoleCrit,nil,nil,role) + BattleLogic.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) + end, + + --获取当前技能的主目标 + [334]=function(role, args,id,judge) + local onSkillCast = function(skill) + if not skill then + return + end + if skill and not skill.isTriggerJudge and judge==1 then + return + end + local list=skill:GetDirectTargets() + local target=RoleManager.GetAggroHero(role,list) + if target and BattleUtil.LengthOfTable(target)>0 then + role.curMainTarget=target[1] + end + end + role.Event:AddEvent(BattleEventName.SkillCastBefore, onSkillCast,nil,nil,role) + end, + --造成的伤害暴击后,[a]%概率恢复[b]点怒气,阵营限制[c](c不填不做限制) + --a[float],b[int],c[int] + [335] = function(role, args,id,judge) + local p1 = args[1] + local v1 = args[2] + local ele = args[3] + --被爆击的人数 + local num=0 + local OnRoleCrit = function(defRole, damage, bCrit, finalDmg, damageType, skill) + if ele and ele~=role.element then + return + end + num=num+1 + end + + local onSkillCast = function(skill) + if skill and not skill.isTriggerJudge and judge==1 then + return + end + role.Event:AddEvent(BattleEventName.RoleCrit, OnRoleCrit,nil,nil,role) + end + + -- 技能后后 + local onSkillCastEnd = function(skill) + if skill and not skill.isTriggerJudge and judge==1 then + return + end + role.Event:RemoveEvent(BattleEventName.RoleCrit, OnRoleCrit,nil,nil,role) + BattleUtil.RandomAction(p1*num,function() + BattleUtil.CalRage(role, role,v1, CountTypeName.Add) + end) + num=0 + end + role.Event:AddEvent(BattleEventName.SkillCast, onSkillCast,nil,nil,role) + role.Event:AddEvent(BattleEventName.SkillCastEnd, onSkillCastEnd,nil,nil,role) + end, + -- 武将怒气为[a]点时即可释放技能,释放技能消耗当前所有怒气 超过[c]点的怒气部分 每消耗1点怒气技能伤害为[b]%(c不填默认为4) + -- a[int]b[float],c[int] + [336] = function(role, args) + local i1 = args[1] + local f1 = args[2] + local num = args[3] + if not num then + num=4 + end + -- 提高技能释放怒气值 + role.SuperSkillRage = i1 + + -- + local allRage = 0 + local function onRoleRageCost(rage, rate, func) + allRage = role.Rage + local deltaRage = allRage - role.SuperSkillRage + if func then + func(0, deltaRage) + end + end + role.Event:AddEvent(BattleEventName.RoleRageCost, onRoleRageCost,nil,nil,role) + + + -- 释放技能后 + local onPassiveDamaging = function(damagingFunc, defRole, damage, skill, dotType) + if skill and skill.type == BattleSkillType.Special then + local deltaRage = allRage - num + if deltaRage > 0 then + local dd = damage-(damage*f1 * deltaRage) + damagingFunc(floor(BattleUtil.ErrorCorrection(dd))) + end + end + end + role.Event:AddEvent(BattleEventName.PassiveDamaging, onPassiveDamaging,nil,nil,role) + + end, } return passivityList \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/BattleLogic.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/BattleLogic.lua index f5144eafe3..bb45ba8e7f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/BattleLogic.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/BattleLogic.lua @@ -27,6 +27,7 @@ local allEnemyDamage=0 --关卡星级记录 local levelStarRecord local hardStageId =0 +local insertSkillRole=nil --是否开启战斗日志 BattleLogic.IsOpenBattleRecord = false --逻辑帧频 @@ -53,6 +54,7 @@ function BattleLogic.Init(data, _userData, maxRound) fightData = data userData = _userData hardStageId=data.nodeId + insertSkillRole=nil BattleLogic.CurOrder = 0 BattleLogic.TotalOrder = #data.enemyData BattleLogic.Clear() @@ -195,6 +197,8 @@ function BattleLogic.GetCurTurn() return CurCamp, CurSkillPos[CurCamp] end + + -- 设置是否是debug function BattleLogic.SetIsDebug(isDebug) _IsDebug = isDebug @@ -267,7 +271,9 @@ function BattleLogic.TurnRound(debugTurn) --轮数变化后延时0.2秒用于初始化监听回合数被动的初始化 BattleLogic.WaitForTrigger(0.2,function() -- 切换阵营 - CurCamp = (CurCamp + 1) % 2 + if not insertSkillRole then + CurCamp = (CurCamp + 1) % 2 + end BattleLogic.CheckBattleLogic() end) end) @@ -284,29 +290,51 @@ function BattleLogic.CheckBattleLogic() "Camp Change", "camp", CurCamp ) - -- 当前阵营下一释放技能的位置 - local cpos = CurSkillPos[CurCamp] + 1 + -- 找到下一个释放技能的人 local SkillRole - for p = cpos, 6 do - -- 保存当前位置 - CurSkillPos[CurCamp] = p - -- 自己阵营中的位置 + 自己阵营的ID * 6 = 自己在PosList中的位置 - local role = RoleManager.GetRole(CurCamp, p) --PosList[p + (CurCamp * 6)] - --角色如果被放逐不能行动 by:wangzhenxing 2020/12/23 11:35 - if role and not role:IsRealDead() and not role.isExile then - SkillRole = role - break - end - - -- 如果当前位置不能释放技能也需要走buff轮转 - BattleLogic.BuffMgr:TurnUpdate(1) -- 计算恢复血量 - BattleLogic.BuffMgr:TurnUpdate(2) -- 计算持续伤害(除去流血) - BattleLogic.BuffMgr:TurnUpdate(3) -- 计算持续伤害(流血) - BattleLogic.BuffMgr:TurnUpdate(4) -- 计算其他buff - BattleLogic.BuffMgr:PassUpdate() -- 计算buff轮数 - BattleLogic.BuffMgr:PassUpdateNoDead() -- 计算buff不灭 + local lastPos + --如果有插入行动的英雄,就先让插入的英雄行动 + if insertSkillRole then + SkillRole =insertSkillRole + insertSkillRole=nil + --记录下正常执行行动的英雄的位置,插入英雄行动完,再按照正常顺序执行 + lastPos=CurSkillPos[CurCamp] + CurSkillPos[CurCamp]=SkillRole.position + -- 如果当前位置不能释放技能也需要走buff轮转 + BattleLogic.BuffMgr:TurnUpdate(1) -- 计算恢复血量 + BattleLogic.BuffMgr:TurnUpdate(2) -- 计算持续伤害(除去流血) + BattleLogic.BuffMgr:TurnUpdate(3) -- 计算持续伤害(流血) + BattleLogic.BuffMgr:TurnUpdate(4) -- 计算其他buff + BattleLogic.BuffMgr:PassUpdate() -- 计算buff轮数 + BattleLogic.BuffMgr:PassUpdateNoDead() -- 计算buff不灭 + CurSkillPos[CurCamp]=lastPos end + if not SkillRole then + -- 当前阵营下一释放技能的位置 + local cpos = CurSkillPos[CurCamp] + 1 + for p = cpos, 6 do + -- 保存当前位置 + CurSkillPos[CurCamp] = p + -- 自己阵营中的位置 + 自己阵营的ID * 6 = 自己在PosList中的位置 + local role = RoleManager.GetRole(CurCamp, p) --PosList[p + (CurCamp * 6)] + + --角色如果被放逐不能行动 by:wangzhenxing 2020/12/23 11:35 + if role and not role:IsRealDead() and not role.isExile then + SkillRole = role + break + end + + -- 如果当前位置不能释放技能也需要走buff轮转 + BattleLogic.BuffMgr:TurnUpdate(1) -- 计算恢复血量 + BattleLogic.BuffMgr:TurnUpdate(2) -- 计算持续伤害(除去流血) + BattleLogic.BuffMgr:TurnUpdate(3) -- 计算持续伤害(流血) + BattleLogic.BuffMgr:TurnUpdate(4) -- 计算其他buff + BattleLogic.BuffMgr:PassUpdate() -- 计算buff轮数 + BattleLogic.BuffMgr:PassUpdateNoDead() -- 计算buff不灭 + end + end + -- 如果找不到下一个人,直接交换阵营 if not SkillRole then BattleLogManager.Log( "No Skill Position" ) @@ -363,6 +391,9 @@ function BattleLogic.WaitForTrigger(delayTime, action) tbActionList:Add(item) end +function BattleLogic.InsertSkillRole(role) + insertSkillRole=role +end function BattleLogic.CurFrame() return curFrame diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/NoDead.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/NoDead.lua index 058d3a16ed..d30137f614 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/NoDead.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/NoDead.lua @@ -8,13 +8,29 @@ function NoDead:SetData(...) self.cover = true --控制效果可被覆盖 -- 刷新排序等级 self.sort = 4 + self.recordDamage=0 end -- 伤害降低 function NoDead:onPassiveDamaging(func, target, damage, skill) if skill and skill.type == BattleSkillType.Special then local dd = BattleUtil.CountValue(damage, self.damageFactor, self.factorCT) - damage - if func then func(-math.floor(BattleUtil.ErrorCorrection(dd))) end + if func then + func(-math.floor(BattleUtil.ErrorCorrection(dd))-self.recordDamage) + end + end +end + +-- 记录承受伤害 +function NoDead:OnRoleBeHit(atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect) + if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill ) and atkRole.camp~=self.target.camp then + self.recordDamage=self.recordDamage+math.floor(damage*0.1) + end +end + +function NoDead:OnSkillCastEnd(skill) + if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra ) then + self.recordDamage=0 end end @@ -22,6 +38,10 @@ end function NoDead:OnStart() -- self.target.Event:AddEvent(BattleEventName.PassiveDamaging, self.onPassiveDamaging, self) + self.target.Event:AddEvent(BattleEventName.SkillCastEnd,self.OnSkillCastEnd,self) + if self.target.star>=11 then + self.target.Event:AddEvent(BattleEventName.RoleBeHit,self.OnRoleBeHit,self) + end self.target:SetDeadFilter(false) self.target:SetReliveFilter(self.isCanRelive) @@ -36,7 +56,12 @@ end --效果结束时调用一次 function NoDead:OnEnd() - self.target.Event:AddEvent(BattleEventName.PassiveDamaging, self.onPassiveDamaging, self) + self.target.Event:RemoveEvent(BattleEventName.PassiveDamaging, self.onPassiveDamaging, self) + self.target.Event:RemoveEvent(BattleEventName.SkillCastEnd,self.OnSkillCastEnd,self) + if self.target.star>=11 then + self.target.Event:RemoveEvent(BattleEventName.RoleBeHit,self.OnRoleBeHit,self) + end + --self.target.Event self.target:SetDeadFilter(true) -- self.target:SetIsCanAddSkill(false) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/HardStageCondition.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/HardStageCondition.lua index b71a0434f4..4e27a1996b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/HardStageCondition.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/HardStageCondition.lua @@ -126,15 +126,95 @@ local _ConditionConfig = { [13]=function(condition) local v1 = condition[1] local v2 = condition[2] + local list=HardStageEventManager.GetCtrlNumList() - if list and list[v1] then - if list[v1]>=v2 then - return 1 - end + if list then + if v1==0 then + local num=0 + for key, value in pairs(list) do + num=num+value + end + if num>=v2 then + return 1 + end + else + if list[v1] and list[v1]>=v2 then + return 1 + end + end + end + return 0 + end, + --持续伤害[a]杀死[b]人 + --a[int 0:所有 1:燃烧 2:毒死] + [14]=function(condition) + local v1 = condition[1] + local v2 = condition[2] + local firing,poison=HardStageEventManager.GetDotDieNum() + if v1==0 then + if firing+poison>=v2 then + return 1 + end + end + if v1==1 then + if firing>=v2 then + return 1 + end + elseif v1==2 then + if poison>=v2 then + return 1 + end + end + return 0 + end, + --追击击杀[a]人,击杀[b]号位敌方(填b 就不会判断 a) + --a[int] b[int] + [15]=function(condition) + local v1 = condition[1] + local v2 = condition[2] + local list=HardStageEventManager.GetAddSkillDieList() + if v2 then + local isHave=BattleUtil.ChecklistIsContainValue(list,v2) + if isHave then + return 1 + else + return 0 + end + else + local num=BattleUtil.LengthOfTable(list) + if num>=v1 then + return 1 + end + end + return 0 + end, + --回复血量[a]次 + [16]=function(condition) + local v1=condition[1] + local time=HardStageEventManager.GetAllTreatTime() + if time>=v1 then + return 1 + end + return 0 + end, + --第[a]个击杀敌方[b]号位 + --a[int 0:是最后],b[int] + [17]=function(condition) + local v1=condition[1] + local v2=condition[2] + local list=HardStageEventManager.GetDeadSortList() + local isHave=BattleUtil.ChecklistIsContainValue(list,v2) + if not isHave then + return 0 + end + if v1==0 then + v1=#list + end + if list[v1]==v2 then + return 1 end return 0 end, - } diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/HardStageEventManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/HardStageEventManager.lua index b62728c2b2..0fe2c90563 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/HardStageEventManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/HardStageEventManager.lua @@ -12,18 +12,35 @@ local recordAddKill local seckKillNum=0 --控制次数集合 local ctrlNumList +--毒死的人数 +local poisonDieNum=0 +--烧死的人数 +local firingDieNum=0 +local allTreatTime=0 +--追击技能击杀任务集合 +local addSkillDieList +--死亡顺序集合 +local deadSortList function this.Init() recordRound=1 roundDamage=0 seckKillNum=0 CurRound=0 + poisonDieNum=0 + firingDieNum=0 + allTreatTime=0 recordRoundDamage={} recordAddKill={} ctrlNumList={} + addSkillDieList={} + deadSortList={} BattleLogic.Event:AddEvent(BattleEventName.RecordDamage,this.OnRecordDamage) BattleLogic.Event:AddEvent(BattleEventName.Seckill,this.OnSeckill) BattleLogic.Event:AddEvent(BattleEventName.BuffRoundChange,this.OnRoundChange) BattleLogic.Event:AddEvent(BattleEventName.RecordBuff,this.OnBuffAdd) + BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead,this.OnRoleDead) + BattleLogic.Event:AddEvent(BattleEventName.BuffStart,this.OnBuffStar) + BattleLogic.Event:AddEvent(BattleEventName.RecordTreat,this.OnRecordTreat) end function this.ClearEvent() @@ -31,6 +48,65 @@ function this.ClearEvent() BattleLogic.Event:RemoveEvent(BattleEventName.Seckill,this.OnSeckill) BattleLogic.Event:RemoveEvent(BattleEventName.BuffRoundChange,this.OnRoundChange) BattleLogic.Event:RemoveEvent(BattleEventName.RecordBuff,this.OnBuffAdd) + BattleLogic.Event:RemoveEvent(BattleEventName.BattleRoleDead,this.OnRoleDead) + BattleLogic.Event:RemoveEvent(BattleEventName.BuffStart,this.OnBuffStar) + BattleLogic.Event:AddEvent(BattleEventName.RecordTreat,this.OnRecordTreat) +end + +--记录治疗 +function this.OnRecordTreat(castRole,targetRole,baseTreat) + if targetRole.camp~=0 then + return + end + allTreatTime=allTreatTime+1 +end + +function this.GetAllTreatTime() + return allTreatTime +end + + +--buff被添加 +function this.OnBuffStar(buff) + if not buff then + return + end + +end + + +--某人死亡 +function this.OnRoleDead(defRole, atkRole,skill,damageType) + if defRole.camp==0 then + return + end + table.insert(deadSortList,defRole.position) + --追击击杀敌方数据 + if skill and skill.isAdd then + table.insert(addSkillDieList,defRole.position) + end + + if defRole.camp==1 and damageType and damageType~=0 then + if damageType==1 then + firingDieNum=firingDieNum+1 + elseif damageType==2 then + poisonDieNum=poisonDieNum+1 + end + end +end + +--获取死亡顺序集合 +function this.GetDeadSortList() + return deadSortList +end +--获取追加技能击杀的敌方集合 +function this.GetAddSkillDieList() + return addSkillDieList +end + +--获取持续伤害死亡的人数 +function this.GetDotDieNum() + return firingDieNum,poisonDieNum end --buff添加成功 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua index cbc5735773..7127593274 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleDefine.lua @@ -81,7 +81,7 @@ BattleEventName = { BeHitMiss = indexAdd(), CritDamageReduceFactor = indexAdd(), -- 暴击伤害减免系数 - + SkillCastBefore = indexAdd(), -- 技能攻击前再往前 SkillCast = indexAdd(), -- 技能攻击前 SkillCastEnd = indexAdd(), -- 技能攻击结束 BeSkillCast = indexAdd(), -- 被技能攻击前 @@ -168,6 +168,8 @@ BattleEventName = { RoleExileEnd = indexAdd(),--角色放逐结束 RoleAddBuffFail = indexAdd(),--角色添加buff失败 RecordRageChange = indexAdd(), -- 怒气改变时 + ActionOperateAngerAfter =indexAdd(),--角色行动操作怒气后 + HitRoleInBurn = indexAdd(), --击中在燃烧状态得敌人 } BattleMaxFrame = 1000000 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua index 2516232a67..a434289bd3 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Misc/BattleUtil.lua @@ -327,7 +327,7 @@ function BattleUtil.ChooseTarget(role, chooseId) elseif chooseLimit == 4 then -- 处于灼烧状态 local tempArr = {} for i = 1, #arr do - if BattleLogic.BuffMgr:HasBuff(arr[i], BuffName.DOT, function (buff) return buff.damageType == DotType.Burn end) then + if BattleLogic.BuffMgr:HasBuff(arr[i], BuffName.DOT, function (buff) return buff.damageType == DotType.Burn end,role,1) then table.insert(tempArr, arr[i]) end end @@ -592,9 +592,9 @@ function BattleUtil.ApplyDamage(skill, atkRole, defRole, damage, bCrit, damageTy local damagingFunc = function(dmgDeduction) damage = damage - dmgDeduction end - atkRole.Event:DispatchEvent(BattleEventName.PassiveDamaging, damagingFunc, defRole, damage, skill, dotType, bCrit) + atkRole.Event:DispatchEvent(BattleEventName.PassiveDamaging, damagingFunc, defRole, damage, skill, dotType, bCrit,damageType, dotType,isDirect) defRole.Event:DispatchEvent(BattleEventName.PassiveBeDamaging, damagingFunc, atkRole, damage, skill, dotType, bCrit) - BattleLogic.Event:DispatchEvent(BattleEventName.PassiveDamaging, damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit) + BattleLogic.Event:DispatchEvent(BattleEventName.PassiveDamaging, damagingFunc, atkRole, defRole, damage, skill, dotType, bCrit,damageType, dotType,isDirect) -- 计算护盾减伤 @@ -624,9 +624,10 @@ function BattleUtil.CalRage(caster, target, value, countType) then return end - + local lastRage=target.Rage -- 操作怒气 local deltaRage = target:AddRage(value, countType) + BattleLogic.Event:DispatchEvent(BattleEventName.RecordRageChange, caster, target, deltaRage,countType,value,lastRage) -- 用于记录统计 BattleLogic.Event:DispatchEvent(BattleEventName.RecordRage, caster, target, deltaRage) end @@ -681,7 +682,7 @@ function BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageTy defRole:SetDead() defRole.Event:DispatchEvent(BattleEventName.RoleDead, atkRole) atkRole.Event:DispatchEvent(BattleEventName.RoleKill, defRole,skill) - BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoleDead, defRole, atkRole,skill) + BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoleDead, defRole, atkRole,skill,dotType) end atkRole.Event:DispatchEvent(BattleEventName.RoleDamage, defRole, damage, bCrit, finalDmg, damageType, dotType, skill) @@ -695,6 +696,10 @@ function BattleUtil.FinalDamage(skill, atkRole, defRole, damage, bCrit, damageTy if skill then atkRole.Event:DispatchEvent(BattleEventName.RoleHit, defRole, damage, bCrit, finalDmg, damageType, skill,isDirect) defRole.Event:DispatchEvent(BattleEventName.RoleBeHit, atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect) + --如果目标是主燃烧目标 or 目标身上有燃烧效果 + if atkRole.curMainTarget==defRole or BattleLogic.BuffMgr:HasBuff(defRole, BuffName.DOT,function(buff) return buff.damageType == 1 end) then + atkRole.Event:DispatchEvent(BattleEventName.HitRoleInBurn,skill,defRole) + end end --如果不是技能带的伤害,并且是直接伤害就,,,,, --用于处理不触发特性并且是直接伤害的伤害 isDirect 暂时先为bool值,后期可根据需求做修改扩展 by:王振兴 2020/10/12 16:18 @@ -933,6 +938,9 @@ end --获取table的长度 function BattleUtil.LengthOfTable(table) + if not table then + return 0 + end local length = 0 for i, v in pairs(table) do length = length + 1 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua index 8050b8100a..2698cb66e9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/RoleLogic.lua @@ -83,6 +83,7 @@ function RoleLogic:Init(uid, data, position) self.ignoreShara = false --忽略敌方分摊 self.type = BattleUnitType.Role self.isNormalAttackAddRage=true --普攻是否回复怒气 + self.curMainTarget=nil --当前主目标 self.passiveList = {} if data.passivity and #data.passivity > 0 then table.sort(data.passivity,function(a,b)return a[1] < b[1] end) @@ -214,7 +215,7 @@ function RoleLogic:AddRage(value, type) elseif type == 4 then --乘减算(百分比属性减算) delta = -floor(value * self.SuperSkillRage) end - self.Event:DispatchEvent(BattleEventName.RoleRageChange, delta) + self.Event:DispatchEvent(BattleEventName.RoleRageChange, delta,self.Rage) --怒气值不可为负值 self.Rage = max(self.Rage + delta, 0) @@ -335,6 +336,7 @@ function RoleLogic:SkillCast(skill, func) -- 角色不可用直接结束技能释放 if not skill or not self:IsAvailable() then + self.Event:DispatchEvent(BattleEventName.ActionOperateAngerAfter,self) _CastDone() return end @@ -355,6 +357,7 @@ function RoleLogic:SkillCast(skill, func) self.Rage = self.Rage + grow end -- 释放完成 + self.Event:DispatchEvent(BattleEventName.ActionOperateAngerAfter,self) _CastDone() end -- 释放普技 @@ -366,6 +369,7 @@ function RoleLogic:SkillCast(skill, func) if skill.isRage then if self.Rage < self.SuperSkillRage then -- 怒气值不足不能释放技能 + self.Event:DispatchEvent(BattleEventName.ActionOperateAngerAfter,self) _CastDone() return end @@ -385,12 +389,13 @@ function RoleLogic:SkillCast(skill, func) self.Rage = self.Rage - costRage end) end - + self.Event:DispatchEvent(BattleEventName.ActionOperateAngerAfter,self) -- 释放绝技 skill:Cast(_CastDone) -- 没有符合条件的技能直接进入下一个技能检测 else + self.Event:DispatchEvent(BattleEventName.ActionOperateAngerAfter,self) _CastDone() end @@ -483,7 +488,7 @@ function RoleLogic:CastSkill(func) end --如果当前怒气不足以释放绝技 if self.Rage= self.SuperSkillRage then @@ -541,6 +546,7 @@ function RoleLogic:GoDead() if self:IsCanDead() then self.isRealDead = true self.Rage = 0 + self.curMainTarget=nil BattleLogic.BuffMgr:ClearBuff(self) self.Event:DispatchEvent(BattleEventName.RoleRealDead, self) BattleLogic.Event:DispatchEvent(BattleEventName.RoleRealDead, self) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua index 641b0233fa..3976f4d9c4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Role/Skill.lua @@ -76,7 +76,7 @@ function Skill:Cast(func) --end self.effectCaster:Cast() end - + self.owner.Event:DispatchEvent(BattleEventName.SkillCastBefore, self) -- 释放技能开始 self.owner.Event:DispatchEvent(BattleEventName.SkillCast, self) BattleLogic.Event:DispatchEvent(BattleEventName.SkillCast, self) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Test/BattleTestPanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Test/BattleTestPanel.lua index 2eb0a5fb23..1dbc1e09a8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Test/BattleTestPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Test/BattleTestPanel.lua @@ -305,9 +305,9 @@ function this.RefreshFightData(type) data.element = roleData.PropertyName data.professionId = roleData.Profession data.quality = roleData.Quality - data.star = 10 + data.star = role.star data.skinId=role.skinId - LogError("skinId==="..role.skinId) + --LogError("skinId==="..role.skinId) data.type = 1 data.job=roleData.Job local paskill = string.split(role.passivity, "#") diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Test/View/RoleSetView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Test/View/RoleSetView.lua index 95c63a34aa..2f72487f98 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Test/View/RoleSetView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Test/View/RoleSetView.lua @@ -13,7 +13,8 @@ function RoleSetView:Init(root) self.skin = Util.GetGameObject(root, "skin/input"):GetComponent("InputField") self.skin.text="0" self.superSkill = Util.GetGameObject(root, "superSkill/input"):GetComponent("InputField") - + self.star = Util.GetGameObject(root, "star/input"):GetComponent("InputField") + self.star.text="0" self.props = Util.GetGameObject(root, "props") self.propList = {} for i = 1, self.props.transform.childCount do @@ -56,6 +57,7 @@ function RoleSetView:LoadFromConfig() local skill = config.SkillList[1] or "" local superSkill = config.SkillList[2] or "" local skinId=tonumber(self.skin.text) + local star = tonumber(self.star.text) self.localData = { monsterId, config.MonsterId, -- roleId @@ -78,6 +80,7 @@ function RoleSetView:LoadFromConfig() config.AntiCritDamageFactor, config.TreatFacter, config.CureFacter, + star, } @@ -87,6 +90,7 @@ function RoleSetView:LoadFromConfig() self.skill.text = self:GetLocalData(4) self.superSkill.text = self:GetLocalData(5) self.skin.text = self:GetLocalData(6) + self.star.text = self:GetLocalData(23) for propIndex, prop in ipairs(self.propList) do prop.text = self:GetLocalData(propIndex + 6) end @@ -139,6 +143,7 @@ function RoleSetView:GetLocalData(index) 0, -- 抗暴率 1, -- 治疗系数 1, -- 治愈系数 + 10, } if not self.localData[index] or self.localData[index] == "" then return (defaultData[index] or 0) @@ -162,6 +167,7 @@ function RoleSetView:Show(camp, pos, data, func) self.skill.text = data.skill or self:GetLocalData(4) self.superSkill.text = data.superSkill or self:GetLocalData(5) self.skin.text = data.skinId or self:GetLocalData(6) + self.star.text = data.star or self:GetLocalData(23) for propIndex, prop in ipairs(self.propList) do prop.text = data.props[propIndex] or self:GetLocalData(propIndex + 6) end @@ -175,6 +181,8 @@ function RoleSetView:ApplyData() self.data.skill = tonumber(self.skill.text) self.data.superSkill = tonumber(self.superSkill.text) self.data.skinId=tonumber(self.skin.text) + LogError("star text:"..self.star.text) + self.data.star = tonumber(self.star.text) for propIndex, prop in ipairs(self.propList) do local value = prop.text == "" and 0 or tonumber(prop.text) self.data.props[propIndex] = tonumber(value) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua index 62c0e7fe3c..8746fc640c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua @@ -440,8 +440,7 @@ function EnemyView:OnceDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotTyp --if self.isDead then return end if dotType then if dotType == DotType.Poison then - self.Floater:ArtFloating(ArtFloatingType.PoisonDamage, ArtFloatingColor.White, dmg,TextFloatingColor.DarkGreen) - + self.Floater:ArtFloating(ArtFloatingType.PoisonDamage, ArtFloatingColor.Poison, dmg,TextFloatingColor.DarkGreen) elseif dotType == DotType.Burn then self.Floater:ArtFloating(ArtFloatingType.FireDamage, ArtFloatingColor.Fire, dmg) else diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/FloatNode.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/FloatNode.lua index 128c8419c7..4a75200bc2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/FloatNode.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/FloatNode.lua @@ -232,10 +232,7 @@ function FloatNode:ArtFloating(type, color, value,frameColor) local animTxtC = animTxt:GetComponent("Text") animTxtC.text = text --主要用于给白色字体染色成其他颜色,color 参数只能填白色 - if frameColor then - local color1 = _FloatingTypeToColor[frameColor] - animTxtC.color= color1 - end + -- 层级和动画 anim:GetComponent("Canvas").sortingOrder = BattleManager.GetBattleSorting() + 100 diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua index 6a99f69bf4..483b4b9578 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua @@ -467,8 +467,7 @@ function PlayerView:OnceDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotTy --if self.isDead then return end if dotType then if dotType == DotType.Poison then - self.Floater:ArtFloating(ArtFloatingType.PoisonDamage, ArtFloatingColor.White, dmg,TextFloatingColor.DarkGreen) - + self.Floater:ArtFloating(ArtFloatingType.PoisonDamage, ArtFloatingColor.Poison, dmg,TextFloatingColor.DarkGreen) elseif dotType == DotType.Burn then self.Floater:ArtFloating(ArtFloatingType.FireDamage, ArtFloatingColor.Fire, dmg) else diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/RoleView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/RoleView.lua index 4efbdd7d30..1fc2dc86f5 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/RoleView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/RoleView.lua @@ -495,8 +495,7 @@ function RoleView:OnceDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotType --if self.isDead then return end if dotType then if dotType == DotType.Poison then - self.Floater:ArtFloating(ArtFloatingType.PoisonDamage, ArtFloatingColor.White, dmg,TextFloatingColor.DarkGreen) - + self.Floater:ArtFloating(ArtFloatingType.PoisonDamage, ArtFloatingColor.Poison, dmg,TextFloatingColor.DarkGreen) elseif dotType == DotType.Burn then self.Floater:ArtFloating(ArtFloatingType.FireDamage, ArtFloatingColor.Fire, dmg) else diff --git a/FontArt/BattleFont/BattleFont.fnt b/FontArt/BattleFont/BattleFont.fnt index a3efe72a7a..68af6656e2 100644 --- a/FontArt/BattleFont/BattleFont.fnt +++ b/FontArt/BattleFont/BattleFont.fnt @@ -1,9 +1,9 @@ info face="Arial" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 outline=0 -common lineHeight=32 base=26 scaleW=1024 scaleH=1024 pages=1 packed=0 alphaChnl=1 redChnl=0 greenChnl=0 blueChnl=0 +common lineHeight=32 base=26 scaleW=1024 scaleH=1024 pages=1 packed=1 alphaChnl=1 redChnl=0 greenChnl=0 blueChnl=0 page id=0 file="BattleFont_0.png" chars count=87 char id=33 x=0 y=0 width=194 height=142 xoffset=0 yoffset=0 xadvance=194 page=0 chnl=15 -char id=34 x=646 y=307 width=106 height=57 xoffset=0 yoffset=0 xadvance=106 page=0 chnl=15 +char id=34 x=268 y=416 width=106 height=57 xoffset=0 yoffset=0 xadvance=106 page=0 chnl=15 char id=35 x=0 y=143 width=149 height=98 xoffset=0 yoffset=0 xadvance=149 page=0 chnl=15 char id=40 x=280 y=0 width=84 height=124 xoffset=0 yoffset=0 xadvance=84 page=0 chnl=15 char id=41 x=938 y=0 width=40 height=124 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 @@ -16,76 +16,76 @@ char id=47 x=865 y=0 width=72 height=124 xoffset=0 yoffset=0 char id=48 x=620 y=0 width=84 height=124 xoffset=0 yoffset=0 xadvance=84 page=0 chnl=15 char id=49 x=195 y=0 width=84 height=124 xoffset=0 yoffset=0 xadvance=84 page=0 chnl=15 char id=50 x=209 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=51 x=530 y=307 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 -char id=52 x=0 y=242 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=53 x=798 y=216 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 -char id=54 x=114 y=242 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=51 x=123 y=424 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 +char id=52 x=173 y=234 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=53 x=228 y=325 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 +char id=54 x=230 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 char id=55 x=504 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 char id=56 x=563 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=57 x=972 y=125 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 -char id=58 x=228 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=59 x=858 y=125 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=57 x=503 y=307 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 +char id=58 x=287 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=59 x=59 y=242 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 char id=60 x=799 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=61 x=559 y=307 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 -char id=62 x=399 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=63 x=853 y=216 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 -char id=64 x=513 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=65 x=445 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=66 x=622 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=67 x=0 y=333 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 -char id=68 x=627 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=69 x=285 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=70 x=268 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=71 x=588 y=307 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 -char id=72 x=915 y=125 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=73 x=908 y=216 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 -char id=74 x=171 y=234 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=61 x=152 y=424 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 +char id=62 x=458 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=63 x=338 y=307 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 +char id=64 x=515 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=65 x=268 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=66 x=327 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=67 x=605 y=307 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 +char id=68 x=629 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=69 x=344 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=70 x=681 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=71 x=239 y=416 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 +char id=72 x=800 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=73 x=393 y=307 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 +char id=74 x=857 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 char id=75 x=150 y=143 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=76 x=327 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=77 x=51 y=333 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 -char id=78 x=456 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=79 x=570 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=80 x=386 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=81 x=617 y=307 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 -char id=82 x=741 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=83 x=963 y=216 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 -char id=84 x=684 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=85 x=681 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=86 x=740 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 -char id=87 x=102 y=333 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 -char id=88 x=57 y=242 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=89 x=342 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 -char id=90 x=80 y=424 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 -char id=91 x=424 y=398 width=21 height=55 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=92 x=907 y=307 width=37 height=56 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 -char id=93 x=316 y=398 width=37 height=55 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 -char id=94 x=945 y=307 width=37 height=56 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 -char id=95 x=120 y=424 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 -char id=96 x=0 y=424 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 -char id=97 x=389 y=398 width=34 height=55 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 -char id=98 x=753 y=307 width=38 height=56 xoffset=0 yoffset=0 xadvance=38 page=0 chnl=15 -char id=99 x=200 y=416 width=38 height=55 xoffset=0 yoffset=0 xadvance=38 page=0 chnl=15 -char id=100 x=40 y=424 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 -char id=101 x=446 y=398 width=21 height=55 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=102 x=831 y=307 width=37 height=56 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 -char id=103 x=278 y=398 width=37 height=55 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 -char id=104 x=869 y=307 width=37 height=56 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 -char id=105 x=160 y=424 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 -char id=106 x=983 y=307 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 -char id=107 x=354 y=398 width=34 height=55 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 -char id=108 x=792 y=307 width=38 height=56 xoffset=0 yoffset=0 xadvance=38 page=0 chnl=15 -char id=109 x=239 y=398 width=38 height=55 xoffset=0 yoffset=0 xadvance=38 page=0 chnl=15 -char id=110 x=153 y=333 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 -char id=111 x=366 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 -char id=112 x=196 y=325 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 -char id=113 x=325 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 -char id=114 x=239 y=307 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 -char id=115 x=407 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 +char id=76 x=386 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=77 x=656 y=307 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 +char id=78 x=914 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=79 x=0 y=333 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=80 x=858 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=81 x=181 y=424 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 +char id=82 x=57 y=333 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=83 x=283 y=307 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 +char id=84 x=401 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=85 x=917 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=86 x=0 y=242 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=87 x=971 y=216 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 +char id=88 x=171 y=333 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=89 x=116 y=242 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=90 x=445 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=91 x=210 y=424 width=28 height=90 xoffset=0 yoffset=0 xadvance=28 page=0 chnl=15 +char id=92 x=572 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=93 x=448 y=307 width=54 height=90 xoffset=0 yoffset=0 xadvance=54 page=0 chnl=15 +char id=94 x=114 y=333 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=95 x=622 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=96 x=740 y=125 width=58 height=90 xoffset=0 yoffset=0 xadvance=58 page=0 chnl=15 +char id=97 x=554 y=307 width=50 height=90 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=15 +char id=98 x=743 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=99 x=686 y=216 width=56 height=90 xoffset=0 yoffset=0 xadvance=56 page=0 chnl=15 +char id=100 x=490 y=398 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 +char id=101 x=1002 y=307 width=21 height=55 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 +char id=102 x=414 y=398 width=37 height=56 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 +char id=103 x=649 y=398 width=37 height=55 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 +char id=104 x=452 y=398 width=37 height=56 xoffset=0 yoffset=0 xadvance=37 page=0 chnl=15 +char id=105 x=530 y=398 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 +char id=106 x=570 y=398 width=39 height=55 xoffset=0 yoffset=0 xadvance=39 page=0 chnl=15 +char id=107 x=687 y=398 width=34 height=55 xoffset=0 yoffset=0 xadvance=34 page=0 chnl=15 +char id=108 x=375 y=398 width=38 height=56 xoffset=0 yoffset=0 xadvance=38 page=0 chnl=15 +char id=109 x=610 y=398 width=38 height=55 xoffset=0 yoffset=0 xadvance=38 page=0 chnl=15 +char id=110 x=976 y=125 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 +char id=111 x=920 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 +char id=112 x=707 y=307 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 +char id=113 x=879 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 +char id=114 x=750 y=307 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 +char id=115 x=961 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 char id=116 x=979 y=0 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 -char id=117 x=448 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 -char id=118 x=282 y=307 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 -char id=119 x=489 y=307 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 -char id=120 x=979 y=91 width=30 height=13 xoffset=0 yoffset=0 xadvance=30 page=0 chnl=15 -char id=121 x=468 y=398 width=29 height=44 xoffset=0 yoffset=0 xadvance=29 page=0 chnl=15 -char id=122 x=979 y=105 width=30 height=13 xoffset=0 yoffset=0 xadvance=30 page=0 chnl=15 -char id=124 x=498 y=398 width=29 height=44 xoffset=0 yoffset=0 xadvance=29 page=0 chnl=15 +char id=117 x=0 y=424 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 +char id=118 x=793 y=307 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 +char id=119 x=41 y=424 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 +char id=120 x=836 y=307 width=42 height=90 xoffset=0 yoffset=0 xadvance=42 page=0 chnl=15 +char id=121 x=82 y=424 width=40 height=90 xoffset=0 yoffset=0 xadvance=40 page=0 chnl=15 +char id=122 x=979 y=91 width=30 height=13 xoffset=0 yoffset=0 xadvance=30 page=0 chnl=15 +char id=124 x=722 y=398 width=29 height=44 xoffset=0 yoffset=0 xadvance=29 page=0 chnl=15 diff --git a/FontArt/BattleFont/BattleFont_0.png b/FontArt/BattleFont/BattleFont_0.png index 8dc532f74a..0036cf3704 100644 Binary files a/FontArt/BattleFont/BattleFont_0.png and b/FontArt/BattleFont/BattleFont_0.png differ diff --git a/FontArt/BattleFont/config.bmfc b/FontArt/BattleFont/config.bmfc index 474de8efae..37a6f4ad31 100644 --- a/FontArt/BattleFont/config.bmfc +++ b/FontArt/BattleFont/config.bmfc @@ -18,6 +18,9 @@ dontIncludeKerningPairs=0 useHinting=1 renderFromOutline=0 useClearType=1 +autoFitNumPages=0 +autoFitFontSizeMin=0 +autoFitFontSizeMax=0 # character alignment paddingDown=0 @@ -28,13 +31,14 @@ spacingHoriz=1 spacingVert=1 useFixedHeight=0 forceZero=0 +widthPaddingFactor=0.00 # output file outWidth=1024 outHeight=1024 outBitDepth=32 fontDescFormat=0 -fourChnlPacked=0 +fourChnlPacked=1 textureFormat=png textureCompression=0 alphaChnl=1 diff --git a/FontArt/BattleFont/r_zhandou_zhongdu_+.png b/FontArt/BattleFont/r_zhandou_zhongdu_+.png index 7e3d972434..6a81b8a268 100644 Binary files a/FontArt/BattleFont/r_zhandou_zhongdu_+.png and b/FontArt/BattleFont/r_zhandou_zhongdu_+.png differ diff --git a/FontArt/BattleFont/r_zhandou_zhongdu_-.png b/FontArt/BattleFont/r_zhandou_zhongdu_-.png index ab76bff18a..dfa9751b53 100644 Binary files a/FontArt/BattleFont/r_zhandou_zhongdu_-.png and b/FontArt/BattleFont/r_zhandou_zhongdu_-.png differ diff --git a/FontArt/BattleFont/r_zhandou_zhongdu_0.png b/FontArt/BattleFont/r_zhandou_zhongdu_0.png index 4f286132ef..08c3a47070 100644 Binary files a/FontArt/BattleFont/r_zhandou_zhongdu_0.png and b/FontArt/BattleFont/r_zhandou_zhongdu_0.png differ diff --git a/FontArt/BattleFont/r_zhandou_zhongdu_1.png b/FontArt/BattleFont/r_zhandou_zhongdu_1.png index 4a52116ad4..b09c6a498f 100644 Binary files a/FontArt/BattleFont/r_zhandou_zhongdu_1.png and b/FontArt/BattleFont/r_zhandou_zhongdu_1.png differ diff --git a/FontArt/BattleFont/r_zhandou_zhongdu_2.png b/FontArt/BattleFont/r_zhandou_zhongdu_2.png index ce597ed0e4..5ba4404f80 100644 Binary files a/FontArt/BattleFont/r_zhandou_zhongdu_2.png and b/FontArt/BattleFont/r_zhandou_zhongdu_2.png differ diff --git a/FontArt/BattleFont/r_zhandou_zhongdu_3.png b/FontArt/BattleFont/r_zhandou_zhongdu_3.png index 07434b2645..168e3fdab4 100644 Binary files a/FontArt/BattleFont/r_zhandou_zhongdu_3.png and b/FontArt/BattleFont/r_zhandou_zhongdu_3.png differ diff --git a/FontArt/BattleFont/r_zhandou_zhongdu_4.png b/FontArt/BattleFont/r_zhandou_zhongdu_4.png index c377c98c13..8329036ff1 100644 Binary files a/FontArt/BattleFont/r_zhandou_zhongdu_4.png and b/FontArt/BattleFont/r_zhandou_zhongdu_4.png differ diff --git a/FontArt/BattleFont/r_zhandou_zhongdu_5.png b/FontArt/BattleFont/r_zhandou_zhongdu_5.png index fdda2cefe2..938a4154d5 100644 Binary files a/FontArt/BattleFont/r_zhandou_zhongdu_5.png and b/FontArt/BattleFont/r_zhandou_zhongdu_5.png differ diff --git a/FontArt/BattleFont/r_zhandou_zhongdu_6.png b/FontArt/BattleFont/r_zhandou_zhongdu_6.png index c9ef5b653d..9e73618d04 100644 Binary files a/FontArt/BattleFont/r_zhandou_zhongdu_6.png and b/FontArt/BattleFont/r_zhandou_zhongdu_6.png differ diff --git a/FontArt/BattleFont/r_zhandou_zhongdu_7.png b/FontArt/BattleFont/r_zhandou_zhongdu_7.png index 5ac34dd103..912a0f2f29 100644 Binary files a/FontArt/BattleFont/r_zhandou_zhongdu_7.png and b/FontArt/BattleFont/r_zhandou_zhongdu_7.png differ diff --git a/FontArt/BattleFont/r_zhandou_zhongdu_8.png b/FontArt/BattleFont/r_zhandou_zhongdu_8.png index 776b2eefc9..b9a4b408aa 100644 Binary files a/FontArt/BattleFont/r_zhandou_zhongdu_8.png and b/FontArt/BattleFont/r_zhandou_zhongdu_8.png differ diff --git a/FontArt/BattleFont/r_zhandou_zhongdu_9.png b/FontArt/BattleFont/r_zhandou_zhongdu_9.png index 23c384a208..f7f186cb13 100644 Binary files a/FontArt/BattleFont/r_zhandou_zhongdu_9.png and b/FontArt/BattleFont/r_zhandou_zhongdu_9.png differ