送十万真充活动,新增文件
parent
fd21726937
commit
21890400b7
|
@ -0,0 +1,35 @@
|
|||
AddAttack = Buff:New() --添加魔法或物攻
|
||||
|
||||
--初始化Buff,通过传入一些自定义参数控制成长相关的数值
|
||||
function AddAttack:SetData(...)
|
||||
self.atkType, --1 物理 2.魔法
|
||||
self.ct,
|
||||
self.value1=...
|
||||
-- 刷新排序等级
|
||||
self.sort = 4
|
||||
end
|
||||
|
||||
|
||||
--初始化后调用一次
|
||||
function AddAttack:OnStart()
|
||||
|
||||
|
||||
end
|
||||
|
||||
--间隔N帧触发,返回true时表示继续触发,返回false立刻触发OnEnd
|
||||
function AddAttack:OnTrigger()
|
||||
return true
|
||||
end
|
||||
|
||||
--效果结束时调用一次
|
||||
function AddAttack:OnEnd()
|
||||
|
||||
|
||||
end
|
||||
|
||||
--只有当cover字段为true时触发,返回true则被新效果覆盖
|
||||
function AddAttack:OnCover(newBuff)
|
||||
return true
|
||||
end
|
||||
|
||||
return AddAttack
|
|
@ -0,0 +1,34 @@
|
|||
Suppress = Buff:New() --压制
|
||||
|
||||
--初始化Buff,通过传入一些自定义参数控制成长相关的数值
|
||||
function Suppress:SetData(...)
|
||||
-- self.atkType, --1 物理 2.魔法
|
||||
-- self.ct,
|
||||
-- self.value1=...
|
||||
-- 刷新排序等级
|
||||
self.sort = 4
|
||||
end
|
||||
|
||||
|
||||
--初始化后调用一次
|
||||
function Suppress:OnStart()
|
||||
|
||||
self.target.isSuppress=true
|
||||
end
|
||||
|
||||
--间隔N帧触发,返回true时表示继续触发,返回false立刻触发OnEnd
|
||||
function Suppress:OnTrigger()
|
||||
return true
|
||||
end
|
||||
|
||||
--效果结束时调用一次
|
||||
function Suppress:OnEnd()
|
||||
self.target.isSuppress=false
|
||||
end
|
||||
|
||||
--只有当cover字段为true时触发,返回true则被新效果覆盖
|
||||
function Suppress:OnCover(newBuff)
|
||||
return true
|
||||
end
|
||||
|
||||
return Suppress
|
|
@ -0,0 +1,62 @@
|
|||
package config;
|
||||
|
||||
import manager.STableManager;
|
||||
import manager.Table;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="SuperZhenChong")
|
||||
public class SSuperZhenChong implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int day;
|
||||
|
||||
private int time;
|
||||
|
||||
private int[] reward;
|
||||
|
||||
private int rewardValue;
|
||||
|
||||
private static Map<Integer, SSuperZhenChong> map = new HashMap<>();
|
||||
private static Map<Integer, Map<Integer, SSuperZhenChong>> dayMap = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
map = STableManager.getConfig(SSuperZhenChong.class);
|
||||
for (SSuperZhenChong value : map.values()) {
|
||||
Map<Integer, SSuperZhenChong> map1 = dayMap.getOrDefault(value.getDay(), new HashMap<>());
|
||||
map1.put(value.getId(),value);
|
||||
dayMap.put(value.getDay(),map1);
|
||||
}
|
||||
}
|
||||
|
||||
public static Map<Integer, SSuperZhenChong> getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
public static Map<Integer, Map<Integer, SSuperZhenChong>> getDayMap() {
|
||||
return dayMap;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public int[] getReward() {
|
||||
return reward;
|
||||
}
|
||||
|
||||
public int getDay() {
|
||||
return day;
|
||||
}
|
||||
|
||||
public int getRewardValue() {
|
||||
return rewardValue;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue