五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

【PE】輪炸20炮 腳本

2022-12-21 18:12 作者:--Reisen--  | 我要投稿

可以自由使用,但請注明來源,遵守 License。
AvZ 版本:AvZ1 221001

/*
MIT License

Copyright (c) 2022 Reisen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

#define NOMINMAX
#include <algorithm>
#include <iterator>
#include <limits>
#include <random>
#include <set>
#include <vector>
#include "avz.h"
#include "fodder.h"
#include "showme/sm.h"

using namespace std;
using namespace AvZ;

MainObject* mo;
class : GlobalVar {
	void beforeScript() override {
		mo = GetMainObject();
	}
} _mo_initializer;

template <typename T>
bool RangeIn(T x, T l, T r) {
	return l <= x && x <= r;
}

template <class... Ts>
void Card(const vector<PlantType>& plant_types, Ts... args) {
	for(auto p: plant_types)
		Card(p, args...);
}

void TryCard(PlantType p, int r, int c) {
 ? ?InsertOperation([=](){
 ? ? ? ?int idx = GetCardIndex(p);
 ? ? ? ?if(idx != -1 && mo->seedArray()[idx].isUsable())
 ? ? ? ? ? ?CardNotInQueue(idx + 1, r, c);
 ? ?});
}

minstd_rand rng(0x14371437);

void set_random_pao_list() {
 ? ?InsertOperation([](){
 ? ? ? ?vector<Grid> pao_list;
 ? ? ? ?for(auto& p : alive_plant_filter)
 ? ? ? ? ? ?if(p.type() == COB_CANNON)
 ? ? ? ? ? ? ? ?pao_list.push_back({p.row() + 1, p.col() + 1});
 ? ? ? ?shuffle(pao_list.begin(), pao_list.end(), rng);
 ? ? ? ?SetNowTime();
 ? ? ? ?pao_operator.resetPaoList(pao_list);
 ? ?});
}

// Copyright (c) 2022 Crescendo
// License unknown = =
int check_hitcd(int row) {
 ? ?int hitCD = std::numeric_limits<int>::max();
 ? ?auto aa = GetPvzBase()->animationMain()->animationOffset()->animationArray();
 ? ?for(auto& zombie : alive_zombie_filter) {
 ? ? ? ?if(RangeIn(zombie.type(), {GARGANTUAR, GIGA_GARGANTUAR}) && zombie.row() == row - 1
 ? ? ? ? ? ?&& zombie.state() == 70 && int(zombie.abscissa()) <= 670) {
 ? ? ? ? ? ?float animation_progress = aa[zombie.mRef<uint16_t>(0x118)].circulationRate();
 ? ? ? ? ? ?if(animation_progress >= 0.648) continue;
 ? ? ? ? ? ?int remain_time = int((zombie.slowCountdown() > 0 ? 414 : 207) * (0.648 - animation_progress)) + 1;
 ? ? ? ? ? ?remain_time += zombie.freezeCountdown();
 ? ? ? ? ? ?hitCD = std::min(hitCD, remain_time);
 ? ? ? ?}
 ? ?}
 ? ?return hitCD;
}

TickRunner main_logic, cob_cannon_fixer;

#define dancings AliveFilter<Zombie>([](Zombie* z) { return z->type() == DANCING_ZOMBIE; })

void Script() {
	OpenMultipleEffective('Q', MAIN_UI_OR_FIGHT_UI);
	SelectCards({M_PUFF_SHROOM, SCAREDY_SHROOM, FLOWER_POT, SUNFLOWER, ICE_SHROOM, COFFEE_BEAN, PUMPKIN, CHERRY_BOMB, KERNEL_PULT, COB_CANNON});
	set_random_pao_list();
	plant_fixer.start(PUMPKIN, {}, 1333);
 ? ?ice_filler.start({{4, 9}});
	fodder.setCards({M_PUFF_SHROOM, SCAREDY_SHROOM, FLOWER_POT, SUNFLOWER});

	main_logic.pushFunc([](){
		SetNowTime();
		if(RangeIn(mo->gameClock() % 348, {149, 323})) {
			int r = mo->gameClock() % 348 == 323 ? 2 : 5;
			bool zombie_exist = false;
			for(auto& z : alive_zombie_filter)
				if(z.type() != IMP && RangeIn(z.row() + 1, r - 1, r + 1))
					zombie_exist = true;
			bool cond = mo->wave() == 20 ||
				(mo->wave() % 10 == 9 && NowTime(mo->wave() + 1) < -373);
			if(zombie_exist || !cond)
				pao_operator.pao(r, r == 2 ? 8.75 : 8.6625);
		}

 ? ? ? ?for(auto& z : alive_zombie_filter)
 ? ? ? ? ? ?if(z.type() == BACKUP_DANCER && z.row() == 5 && z.abscissa() < 600 && z.stateCountdown() == 100) {
 ? ? ? ? ? ? ? ?int t = 348 - (mo->gameClock() + 174) % 348;
 ? ? ? ? ? ? ? ?int y_dis = 15 + (100 - t) * 4 / 3;
 ? ? ? ? ? ? ? ?int x_dis = 686 - (int(z.abscissa()) + 78);
 ? ? ? ? ? ? ? ?if(x_dis * x_dis + y_dis * y_dis > 115 * 115)
 ? ? ? ? ? ? ? ? ? ?TryCard(CHERRY_BOMB, 6, 9);
 ? ? ? ? ? ?}

 ? ? ? ?for(int r : {1, 2, 5, 6})
 ? ? ? ? ? ?if(check_hitcd(r) <= 3)
 ? ? ? ? ? ? ? ?TryCard(CHERRY_BOMB, r, 9);
	});

	cob_cannon_fixer.pushFunc([](){
		int kp_idx = GetCardIndex(KERNEL_PULT), cob_idx = GetCardIndex(COB_CANNON);
		auto sa = mo->seedArray();
		if(!sa[kp_idx].isUsable() || !sa[cob_idx].isUsable()) return;
 ? ? ? ?if(mo->wave() == 20) return;
		for(auto& p : alive_plant_filter)
			if(p.hp() < 100 && p.state() == 35 && p.stateCountdown() + 125 > 751 + 625) {
				int r = p.row() + 1, c = p.col() + 1;
				SetNowTime(); Shovel(r, c); Card(KERNEL_PULT, r, c);
				set_random_pao_list();
				Delay(751); Card(KERNEL_PULT, r, c + 1); Card(COB_CANNON, r, c);
				set_random_pao_list();
				return;
			}
	});

	for(int wave = 1; wave <= 20; wave++) if(wave % 10 != 0)
 ? ? ? ?InsertTimeOperation(90, wave, [=](){
 ? ? ? ? ? ?int next_cob[2] = {348 + 90 - mo->gameClock() % 348, 348 + 90 - (mo->gameClock() + 174) % 348};
 ? ? ? ? ? ?set<int> a, b;
 ? ? ? ? ? ?if(next_cob[0] > 318) a.insert({1, 2});
 ? ? ? ? ? ?if(next_cob[1] > 318) a.insert({5, 6});
 ? ? ? ? ? ?for(auto& z : dancings) b.insert(z.row() + 1);
 ? ? ? ? ? ?vector<int> rows;
 ? ? ? ? ? ?set_intersection(a.begin(), a.end(), b.begin(), b.end(), back_inserter(rows));
 ? ? ? ? ? ?if(rows.empty()) return;
 ? ? ? ? ? ?int t = next_cob[a.count(5)];
 ? ? ? ? ? ?if(t > 341) {
 ? ? ? ? ? ? ? ?SetTime(t - 194, wave);
 ? ? ? ? ? ? ? ?fodder(rows, 60);
 ? ? ? ? ? ?} else {
 ? ? ? ? ? ? ? ?SetTime(90, wave);
 ? ? ? ? ? ? ? ?fodder(rows, t - 159 - 90);
 ? ? ? ? ? ?}
 ? ? ? ?});

 ? ?for(int wave : {10, 20})
 ? ? ? ?InsertTimeOperation(140, wave, [=](){
 ? ? ? ? ? ?int next_cob[2] = {348 + 140 - mo->gameClock() % 348, 348 + 140 - (mo->gameClock() + 174) % 348};
 ? ? ? ? ? ?set<int> a, b;
 ? ? ? ? ? ?if(next_cob[0] > 341)
 ? ? ? ? ? ? ? ?a.insert({1, 2});
 ? ? ? ? ? ?if(next_cob[1] > 341)
 ? ? ? ? ? ? ? ?a.insert({5, 6});
 ? ? ? ? ? ?for(auto& z : dancings)
 ? ? ? ? ? ? ? ?b.insert(z.row() + 1);
 ? ? ? ? ? ?vector<int> rows;
 ? ? ? ? ? ?set_intersection(a.begin(), a.end(), b.begin(), b.end(), back_inserter(rows));
 ? ? ? ? ? ?if(rows.empty())
 ? ? ? ? ? ? ? ?return;
 ? ? ? ? ? ?int time = max(next_cob[a.count(5)] - 194, 203);
 ? ? ? ? ? ?SetTime(time, wave);
 ? ? ? ? ? ?fodder(rows, 60);
 ? ? ? ?});

	auto ztl = mo->zombieTypeList();
	if(ztl[BUNGEE_ZOMBIE] || ztl[JACK_IN_THE_BOX_ZOMBIE])
		for(int w : {10, 20}) {
			SetTime(395 - 298, w);
 ? ? ? ? ? ?ice_filler.coffee();
 ? ? ? ?}
	SetTime(250 - 378, 20);
	pao_operator.pao(4, 7.5);
}

SMShowMe sm;

void Draw() {
 ? ?auto& bar_painter = sm.getPainter();
 ? ?for(auto& p : alive_plant_filter)
 ? ? ? ?if(p.type() == COB_CANNON && RangeIn(p.col(), {0, 6})) {
 ? ? ? ? ? ?double rate = 1.0 * p.hp() / p.hpMax();
 ? ? ? ? ? ?bar_painter.drawBar(p.xi() + 80, p.yi() - 10, rate, 120, 7, 1, 0xFF00FF00, SMPainter::RIGHT, {rate});
 ? ? ? ?}
}



【PE】輪炸20炮 腳本的評論 (共 條)

分享到微博請遵守國家法律
天长市| 麦盖提县| 桓台县| 辉南县| 紫阳县| 比如县| 镇原县| 平安县| 红河县| 沾益县| 兴仁县| 潼南县| 滨州市| 石屏县| 拉萨市| 招远市| 汝南县| 榆树市| 临夏县| 隆安县| 塔河县| 乌兰察布市| 通化县| 韶山市| 永济市| 铜川市| 孟津县| 三江| 德庆县| 阳泉市| 喜德县| 许昌县| 吴桥县| 衡阳县| 祁阳县| 板桥市| 仪征市| 二连浩特市| 清水河县| 高唐县| 青神县|