-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathother.lua
740 lines (730 loc) · 23.5 KB
/
other.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
require "import"
import "android.app.*"
import "android.os.*"
import "android.widget.*"
import "android.view.*"
import "commonHelper"
local Item = import "item"
local 境界 = import "tupo"
local Color = {hui="#C6C6C6",black="#000000",white="#FFFFFF",green="#008000",blue="#0000FF",red="#FF0000",orange="#FFA500",gold="#FFD700"}
local 品级 = {"黄阶下品","黄阶中品","黄阶上品","玄阶下品","玄阶中品","玄阶上品","地阶下品","地阶中品","地阶上品","天阶下品","天阶中品","天阶上品","仙品"}
local tab = {"体质","真元","身法","肉身","外攻","内攻","气血上限","法力上限","外防","内防","会心率","抗会心率","会心伤害","会心免伤","闪避","命中","最终伤害放大","最终伤害抵消","基础生命","基础法力","基础攻击","基础防御","基础会心","基础闪避","基础命中","神念消耗","材料消耗","成丹率","成功率","出丹率","评分提升","属性品质","获取经验"}
function Color:Set(str,lv)
if lv >= 13 then
str="<font color="..self.gold..">"..str.."</font>"
elseif lv >= 10 then
str="<font color="..self.orange..">"..str.."</font>"
elseif lv >= 7 then
str="<font color="..self.red..">"..str.."</font>"
elseif lv >= 4 then
str="<font color="..self.blue..">"..str.."</font>"
else
str="<font color="..self.green..">"..str.."</font>"
end
return Html.fromHtml(str)
end
function Color:Get(str,lv)
if lv >= 13 then
str="<font color="..self.gold..">"..str.."</font>"
elseif lv >= 10 then
str="<font color="..self.orange..">"..str.."</font>"
elseif lv >= 7 then
str="<font color="..self.red..">"..str.."</font>"
elseif lv >= 4 then
str="<font color="..self.blue..">"..str.."</font>"
else
str="<font color="..self.green..">"..str.."</font>"
end
return str
end
function yanse(str,ys)
str="<font color="..ys..">"..str.."</font>"
return Html.fromHtml(str)
end
function yansep(str,ys)
str="<font color="..ys[1]..">"..str.."</font>"
return str
end
function 获取颜色(tab,key)
local data = tab["四维"]
local num = data[1] + data[2] + data[3] + data[4]
local tb = {{2000,"#808080","[资质:低劣]"},{2800,"#008000","[资质:普通]"},{3600,"#0000FF","[资质:优秀]"},{4400,"#FF0000","[资质:极品]"},{5200,"#FFA500","[资质:绝世]"},{666666,"#FFD700","[资质:仙资]"}}
local cl
for i=1,#tb do
if num <= tb[i][1] then
cl = {tb[i][2],tb[i][3],i}
break
end
end
return yansep(key,cl)
end
function cspz(tab,key)
local data = tab["四维"]
local num = data[1] + data[2] + data[3] + data[4]
local tb = {{2000,"#808080","[资质:低劣]"},{2800,"#008000","[资质:普通]"},{3600,"#0000FF","[资质:优秀]"},{4400,"#FF0000","[资质:极品]"},{5200,"#FFA500","[资质:绝世]"},{666666,"#FFD700","[资质:仙资]"}}
local cl
for i=1,#tb do
if num <= tb[i][1] then
cl = {tb[i][2],tb[i][3],i}
break
end
end
if tab.eq ~= 1 then
cl[2] = cl[2].."[未出战]"
else
cl[2] = cl[2].."[已出战]"
end
return yanse(key..cl[2],cl[1]),cl
end
function othershop(tbl)
local its = {
LinearLayout;
layout_height="fill";
layout_width="fill";
{
CardView;
cardBackgroundColor="#FFF7F7F7";
layout_gravity="center";
layout_height="40dp";
elevation="0dp";
layout_margin="2%w";
layout_width="fill";
radius="5dp";
{
LinearLayout;
id="";
layout_width="fill";
layout_height="fill";
layout_margin="0dp";
gravity="center";
{
TextView;
text="name";
textSize=getsize(10);
textColor="#333333";
id="name";
};
};
};
};
local wei = {
LinearLayout;
background='#ffffffff';
layout_height="fill";
orientation="vertical";
layout_width="fill";
{
FrameLayout;
layout_height="5%h";
layout_width="match_parent";
{
TextView;
id="myshop";
text="我的摊位";
layout_gravity="center";
textColor="#000000";
};
};
{
CardView;
layout_margin="2.5%w";
layout_height="50%h";
layout_width="fill";
{
ListView;
id="我的摊位";
layout_height="match_parent";
layout_width="60%h";
};
};
{
TextView;
id="收益";
text="灵石收益:500000";
textColor="#000000";
};
};
local ww=PopupWindow(activity)--创建PopWindow
ww.setContentView(loadlayout(wei))--设置布局
ww.setWidth(activity.Width*0.96)--设置宽度
ww.setHeight(-2)--设置高度
ww.setFocusable(true)--设置可获得焦点
ww.setTouchable(true)--设置可触摸
ww.setOutsideTouchable(true)
ww.showAtLocation(view,Gravity.CENTER,0,0)
myshop.Text = table.concat({tbl.info,"[热度:",tbl.hot,"]"})
收益.Text = "灵石:"..tbl.money
local jjy = 加载框()
hs("http://82.157.62.200/zm/dcd.php?id="..tbl.id,function(code,body)
task(500,function jjy.dismiss() end)
if code ~= -1 and code >= 200 and code <= 400 then
local tb = cjson.decode(body)
local data1 = {}
local adp1=LuaAdapter(activity,data1,its)
local no = #data1
for i=1,no do
table.remove(data1)
end
for k,v in pairs(tb) do
tb[k].item = cjson.decode(v.item)
local p = Item:GetTable(v.item.key)
if p.type <= 5 then
str = table.concat({v.item.key,"[",品级[p["品质"]],"][评分:",upeqdatas(v.item),"][数量:",math.ceil(v.number),"][单价:",math.ceil(v.price),"]"})
else
str = table.concat({v.item.key,"[",品级[p["品质"]],"][数量:",math.ceil(v.number),"][单价:",math.ceil(v.price),"]"})
end
if tonumber(v.type) == 1 then
table.insert(data1,{name=Color:Set(table.concat({str,"[已上架]"}),p["品质"])})
elseif tonumber(v.type) == 2 then
table.insert(data1,{name=Color:Set(table.concat({str,"[被拒审]"}),p["品质"])})
else
table.insert(data1,{name=Color:Set(table.concat({str,"[待审核]"}),p["品质"])})
end
end
if #data1 == 0 then
table.insert(data1,{name="无商品"})
end
我的摊位.Adapter=adp1
我的摊位.onItemClick=function(l,v,p,i)
local e,q = ShowMenu(tb[i].item)
end
else
提示("网络连接失败")
end
end)
end
local d
function otherpet(tb)
local its = {
LinearLayout;
layout_height="fill";
layout_width="fill";
{
CardView;
cardBackgroundColor="#FFF7F7F7";
layout_gravity="center";
layout_height="6%h";
elevation="0dp";
layout_margin="2%w";
layout_width="fill";
radius="5dp";
{
LinearLayout;
id="";
layout_width="fill";
layout_height="fill";
layout_margin="0dp";
gravity="center";
{
TextView;
text="name";
textSize=getsize(14);
textColor="#333333";
id="name";
};
};
};
};
local data = {}
if d ~= nil then
d.dismiss()
end
d=PopupWindow(activity)--创建PopWindow
d.setContentView(loadlayout(MapUI()["宠兽列表"]))--设置布局
d.setWidth(activity.Width*0.92)--设置宽度
d.setHeight(-2)--设置高度
d.setFocusable(true)--设置可获得焦点
d.getBackground().setAlpha(0)
d.setTouchable(true)--设置可触摸
--设置点击外部区域是否可以消失
d.setOutsideTouchable(false)
--显示
d.showAtLocation(view,Gravity.CENTER,0,0)
local adp=LuaAdapter(activity,data,its)
if #tb > 0 then
for k,v in pairs(tb) do
local a,b = cspz(v,v.name)
if v.body == nil then
rollpet(v,b[3],v.bh)
v.body = {}
end
table.insert(data,{name=a,id=v.id})
end
else
table.insert(data,{name="没有宠兽"})
end
宠兽.Adapter=adp
end
function otherbag(tb)
table.sort(tb,function(a,b)
return Item:GetTable(a.key)["品质"] < Item:GetTable(b.key)["品质"]
end)
local ky = {
LinearLayout;
background='#ffffffff',
layout_width="fill";
layout_height="fill";
orientation="vertical";
{
FrameLayout;
layout_height="6%h";
layout_width="match_parent";
{
TextView;
layout_gravity="center";
textSize="24sp";
text="背包";
textColor="#000000";
};
};
{
LinearLayout;
layout_width="match_parent";
layout_height="50%h";
orientation="horizontal";
{
RadioGroup;
id="bbb";
{
RadioButton;
text="全部";
};
{
RadioButton;
text="武器";
};
{
RadioButton;
text="衣服";
};
{
RadioButton;
text="帽子";
};
{
RadioButton;
text="护腕";
};
{
RadioButton;
text="鞋子";
};
{
RadioButton;
text="饰品";
};
{
RadioButton;
text="丹药";
};
{
RadioButton;
text="秘籍";
};
{
RadioButton;
text="特殊";
};
{
RadioButton;
text="副职";
};
};
{
ListView;
layout_width="match_parent";
layout_height="match_parent";
id="bei";
};
};
};
local its = {
LinearLayout;
layout_height="fill";
layout_width="fill";
{
CardView;
cardBackgroundColor="#FFF7F7F7";
layout_gravity="center";
layout_height="45dp";
elevation="0dp";
layout_margin="2%w";
layout_width="fill";
radius="5dp";
{
LinearLayout;
id="";
layout_width="fill";
layout_height="fill";
layout_margin="0dp";
gravity="center";
{
TextView;
text="name";
textSize=getsize(14);
textColor="#333333";
id="name";
};
};
};
};
local bag = PopupWindow(activity)--创建PopWindow
bag.setContentView(loadlayout(ky))--设置布局
bag.setWidth(activity.Width*0.92)--设置宽度
bag.setHeight(activity.Height*0.6)--设置高度
bag.setFocusable(true)--设置可获得焦点
bag.getBackground().setAlpha(0)
bag.setTouchable(true)--设置可触摸
--设置点击外部区域是否可以消失
bag.setOutsideTouchable(false)
--显示
bag.showAtLocation(view,Gravity.CENTER,0,0)
local data={}
local adp=LuaAdapter(activity,data,its)
bei.Adapter=adp
function itsz(tb,n,m)
local tlb = {}
local num = #data
for i=1,num do
table.remove(data)
end
for k,v in pairs(tb) do
local t = Item:GetTable(v.key)
if t.type >= n and t.type <= m then
table.insert(tlb,v)
end
end
for k,v in pairs(tlb) do
local t = Item:GetTable(v.key)
if t.type <= 5 then
table.insert(data,{name=Color:Set(v.key.."["..品级[t["品质"]].."]".."[数量:"..math.ceil(v.number).."][评分:"..upeqdatas(v).."]",t["品质"])})--添加数据进适配器,还有一种方法table.insert(data,{})
else
table.insert(data,{name=Color:Set(v.key.."["..品级[t["品质"]].."]".."[数量:"..math.ceil(v.number).."]",t["品质"])})--添加数据进适配器,还有一种方法table.insert(data,{})
end
end
adp.notifyDataSetChanged()
bei.onItemClick=function(l,v,p,i)
ShowMenu(tlb[i])
end
end
bbb.setOnCheckedChangeListener{
onCheckedChanged=function(g,c)
l=g.findViewById(c)
if l.Text == "全部" then
itsz(tb,-5,100)
elseif l.Text == "武器" then
itsz(tb,0,0)
elseif l.Text == "衣服" then
itsz(tb,1,1)
elseif l.Text == "帽子" then
itsz(tb,2,2)
elseif l.Text == "护腕" then
itsz(tb,3,3)
elseif l.Text == "鞋子" then
itsz(tb,4,4)
elseif l.Text == "饰品" then
itsz(tb,5,5)
elseif l.Text == "丹药" then
itsz(tb,6,6)
elseif l.Text == "秘籍" then
itsz(tb,7,7)
elseif l.Text == "特殊" then
itsz(tb,8,15)
elseif l.Text == "副职" then
itsz(tb,-5,-1)
end
end}
itsz(tb,-5,100)
end
function 属性面板(prole)
local function GetEquipmentShow(ltb)
local x = 1
local tb
--local tab = {"体质","真元","身法","肉身","外攻","内攻","气血上限","法力上限","外防","内防","会心率","抗会心率","会心伤害","会心免伤","闪避","命中","最终伤害放大","最终伤害抵消","基础生命","基础法力","基础攻击","基础防御","基础会心","基础闪避","基础命中"}
repeat
if ltb.key == Item[x].key then
tb={type=Item[x].type,Info=Item[x].Info,["品质"]=Item[x]["品质"],price=Item[x].price,pet=Item[x].pet}
for k,v in pairs(ltb) do
tb[k] = v
end
for k,v in pairs(tab) do
if Item[x][v] then
if tb[v] == nil then
tb[v] = 1
end
tb[v] = math.ceil(Item[x][v] * tb[v])
end
end
if Item[x]["资源参数"] then
tb["资源参数"]=Item[x]["资源参数"]
end
break
else
x = x + 1
end
until x > #Item
return tb
end
function 排行功法面板()
OpenSkillMenu("功法面板",prole.inskill,prole.skill,true)
end
local function EquipmentShow(eq)
local t = {}
for k,v in pairs(eq) do
t[#t+1] = GetEquipmentShow(v)
t[k]["附加属性"] = v["附加属性"]
end
return t
end
local a
if tab ~= nil then
att = Item:GetTirgger(prole)
a=PopupWindow(activity)--创建PopWindow
a.setContentView(loadlayout(MapUI()["排行面板"]))--设置布局
a.setWidth(activity.Width*0.92)--设置宽度
a.setHeight(activity.Height*0.48)--设置高度
a.setFocusable(true)--设置可获得焦点
a.getBackground().setAlpha(0)
a.setTouchable(true)--设置可触摸
--设置点击外部区域是否可以消失
a.setOutsideTouchable(false)
--显示
a.showAtLocation(view,Gravity.CENTER,0,0)
排行姓名.Text=排行姓名.Text..prole.key
排行境界.Text=排行境界.Text..境界[prole.level]["境界"]
排行体质.Text=排行体质.Text..math.ceil(att["体质"])
排行真元.Text=排行真元.Text..math.ceil(att["真元"])
排行身法.Text=排行身法.Text..math.ceil(att["身法"])
排行肉身.Text=排行肉身.Text..math.ceil(att["肉身"])
排行内攻.Text=排行内攻.Text..att["内攻"]
排行外攻.Text=排行外攻.Text..att["外攻"]
排行法力.Text=排行法力.Text..att["法力上限"]
排行血量.Text=排行血量.Text..att["气血上限"]
排行内防.Text=排行内防.Text..att["内防"]
排行外防.Text=排行外防.Text..att["外防"]
排行命中.Text=排行命中.Text..att["命中"]
排行闪避.Text=排行闪避.Text..att["闪避"]
排行会心率.Text=排行会心率.Text..att["会心率"]
排行抗会心率.Text=排行抗会心率.Text..att["抗会心率"]
排行会心伤害.Text=排行会心伤害.Text..att["会心伤害"].."%"
排行会心免伤.Text=排行会心免伤.Text..att["会心免伤"].."%"
排行最终伤害放大.Text=排行最终伤害放大.Text..att["最终伤害放大"].."%"
排行最终伤害抵消.Text=排行最终伤害抵消.Text..att["最终伤害抵消"].."%"
phfight.Text = "战斗力:"..math.ceil(att["内攻"]*2+att["外攻"]*2+att["内防"]*2.5+att["外防"]*2.5+att["气血上限"]*0.2+att["法力上限"]*0.1+att["会心率"]*2+att["抗会心率"]*2+att["闪避"]*2.5+att["命中"]*2.5+att["会心伤害"]*20+att["会心免伤"]*20+att["最终伤害放大"]*30+att["最终伤害抵消"]*30)
end
--function 封禁()
--b:insert("cheak",{key=tb[i].id},function(code,body)
--end)
--end
function 排行切磋()
local _role = table.clone(SaveTable.owner)
_role.hard = 境界[_role.level].hard
if _role.buff ~= nil then
if _role.buff["转生"] ~= nil then
if _role.buff["转生"] > _role.level then
_role.hard = _role.hard + 境界[_role.buff["转生"]].hard * 0.2
end
if _role.hard > 境界[_role.buff["转生"]].hard then
_role.hard = 境界[_role.buff["转生"]].hard
end
end
end
_role.Attribute = Item:GetTirgger(_role)
_role.Hp = _role.Attribute["气血上限"]
_role.Mp = _role.Attribute["法力上限"]
GetTalent(_role)
prole.hard = 境界[prole.level].hard
if prole.buff ~= nil then
if prole.buff["转生"] ~= nil then
if prole.buff["转生"] > prole.level then
prole.hard = prole.hard + 境界[prole.buff["转生"]].hard * 0.2
end
if prole.hard > 境界[prole.buff["转生"]].hard then
prole.hard = 境界[prole.buff["转生"]].hard
end
end
end
prole.Attribute = att
prole.Hp = prole.Attribute["气血上限"]
prole.Mp = prole.Attribute["法力上限"]
GetTalent(prole)
local skill = import "skill"
for k,v in pairs(prole.skill) do
if v.eq == 1 then
prole.skill[k]["战斗参数"] = skill:GetTable(v.key,v.level)
end
end
for k,v in pairs(_role.skill) do
if v.eq == 1 then
_role.skill[k]["战斗参数"] = skill:GetTable(v.key,v.level)
end
end
local jt = _role
jt.team = 1
local et = prole
prole.team = 2
local spt = {jt,et}
a.dismiss()
_role.sp = (_role.Attribute["身法"]+_role.hard*2)*_role.hard/10
prole.sp = (prole.Attribute["身法"]+prole.hard*2)*prole.hard/10
BattleStart(nil,spt,1)
end
function OpenEquipment(eq)
eq = eq or prole.eq
local EqTable = EquipmentShow(eq)
import"android.graphics.drawable.ColorDrawable"
local a=AlertDialog.Builder(this).show()
a.getWindow().setContentView(loadlayout(MapUI()["装备面板"]));
--点击阴影部分不会关闭弹窗
for k,v in pairs(EqTable) do
if v.type == 0 then
武器.Text = Color:Set(EqLevel(v.key,v.level),v["品质"])
elseif v.type == 1 then
衣服.Text = Color:Set(EqLevel(v.key,v.level),v["品质"])
elseif v.type == 2 then
帽子.Text = Color:Set(EqLevel(v.key,v.level),v["品质"])
elseif v.type == 3 then
护手.Text = Color:Set(EqLevel(v.key,v.level),v["品质"])
elseif v.type == 4 then
鞋子.Text = Color:Set(EqLevel(v.key,v.level),v["品质"])
elseif v.type == 5 then
首饰.Text = Color:Set(EqLevel(v.key,v.level),v["品质"])
end
end
function EquipmentShowMenu(type)
-- local tab = {"体质","真元","身法","肉身","外攻","内攻","气血上限","法力上限","外防","内防","会心率","抗会心率","会心伤害","会心免伤","闪避","命中","最终伤害放大","最终伤害抵消","基础生命","基础法力","基础攻击","基础防御","基础会心","基础闪避","基础命中"}
local x = 1
local t
if #EqTable ~= 0 then
repeat
if type == EqTable[x].type then
t = EqTable[x]
break
else
x = x + 1
end
until x > #EqTable
end
if t ~= nil then
import"android.graphics.drawable.ColorDrawable"
a=AlertDialog.Builder(this).show()
a.getWindow().setContentView(loadlayout(MapUI()["战斗装备数据"]));
物品名称.Text = Color:Set(EqLevel(t.key,t.float).."["..品级[t["品质"]].."]",t["品质"])
物品介绍.Text = 物品介绍.Text..":\n"..t.Info.."\n"
local f = ""
for k,v in pairs(tab) do
if t[v] then
if v == "会心伤害" or v == "会心免伤" or v == "最终伤害放大" or v == "最终伤害抵消" then
f=f..v..":"..math.ceil(t[v]*(1.1^t.level)).."%\n"
elseif v=="气血上限" then
f=f.."气血上限:"..math.ceil(t[v]*(1.1^t.level)).."\n"
elseif v=="法力上限" then
f=f.."法力上限"..math.ceil(t[v]*(1.1^t.level)).."\n"
else
f=f..v..":"..math.ceil(t[v]*(1.1^t.level)).."\n"
end
end
end
物品属性.Text = 物品属性.Text..":\n"..f
if #t["附加属性"] > 0 then
local num
if t["品质"] >= 13 then
num = 10
elseif t["品质"] > 9 then
num = 7
elseif t["品质"] > 6 then
num = 5
elseif t["品质"] > 3 then
num = 3
else
num = 2
end
战斗装备框.addView(loadlayout{
TextView;
text=Html.fromHtml("附加属性("..#t["附加属性"].."/"..num.."):");
},4)
local num1 = 5
local tx
local Trigger = import "Trigger"
for k,v in pairs(t["附加属性"]) do
local sp = split(Trigger["属性"][t["品质"]][v[1]],"#")
local tb = {}
for k,v in pairs(sp) do
local sp1 = split(v,"|")
local tab = {}
for i=1,#sp1 do
if tonumber(sp1[i]) then
table.insert(tab,tonumber(sp1[i]))
else
table.insert(tab,sp1[i])
end
end
table.insert(tb,tab)
end
local co
for g,h in pairs(tb) do
if v[2] <= h[2] then
co = "#"..h[4]
break
end
end
if v[1] == "会心伤害" or v[1] == "会心免伤" or v[1] == "最终伤害放大" or v[1] == "最终伤害抵消" or string.find(v[1],"基础") then
tx = v[1]..":"..math.ceil(v[2]*(1.1^t.level)).."%"
elseif v[1] == "气血上限" then
tx = "气血上限:"..math.ceil(v[2]*(1.1^t.level))
elseif v[1] == "法力上限" then
tx = "法力上限:"..math.ceil(v[2]*(1.1^t.level))
else
tx = v[1]..":"..math.ceil(v[2]*(1.1^t.level))
end
战斗装备框.addView(loadlayout{
TextView;
text=Html.fromHtml(GetColor(tx,co));
},num1)
num1 = num1 + 1
end
local z = math.floor(t.level/5)
local djp
if #eq >= 6 then
for k,v in pairs(EqTable) do
if djp == nil then
djp = v["品质"]
elseif v["品质"] < djp then
djp = v["品质"]
end
local fl = math.floor(v.level/5)
if z > fl then
z = fl
end
end
local stri,numi
if djp >= 13 then
stri = "仙器"
numi = math.ceil((10+10*z)*z/2)
elseif djp >= 10 then
stri = "天阶"
numi = math.ceil((7+7*z)*z/2)
elseif djp >= 7 then
stri = "地阶"
numi = math.ceil((5+5*z)*z/2)
elseif djp >= 4 then
stri = "玄阶"
numi = math.ceil((3+3*z)*z/2)
else
stri = "黄阶"
numi = math.ceil((2+2*z)*z/2)
end
if z > 0 then
战斗装备框.addView(loadlayout{
TextView;
text=Color:Set("<br>"..stri..math.ceil(z*5).."转:<br>基础生命:"..numi.."%<br>基础法力:"..numi.."%<br>基础攻击:"..numi.."%<br>基础防御:"..numi.."%<br>基础命中:"..numi.."%<br>基础闪避:"..numi.."%<br>基础会心:"..numi.."%",djp);
},num1)
end
end
end
else
MD提示("无装备!")
end
end
end
end